Facebook v3 sdk monodroid binding

Has anyone tried to create a new mododic binding for version 3 sdk for Facebook? I used an older version of sdk for Facebook created using Monodroid Facebook binding . But the new Facebook sdk has almost all of these methods obsolete.

I had a problem with setting up a new binding, basically the class is com.facebook.android.Facebooknow deprecated, and Facebook.Authorizereplaced by Session. I can create a jar file of the new facebook sdk, but the class Sessiondoes not appear in the object browser in visual studio when viewing .dll. The class Sessionis publicly available and implements java.io.Serializable, which is included in the link Mono.Android. Any help or suggestions would be appreciated.

edit: After a few days with this, I will be able to overcome this problem with work that actually does not solve my problem by removing node in Metadata.xml.

<remove-node path="/api/package[@name='com.facebook']/class[@name='Session.OpenRequest']/method[@name='setPermissions']"/>

This causes other problems that can be solved by adding more tags <attr>.

  <remove-node path="/api/package[@name='com.facebook.model']/class[@name='PropertyName']"/>
  <attr path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectAdapter']" name="visibility">public</attr>
  <attr path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectPagingLoader']" name="visibility">public</attr>
  <attr path="/api/package[@name='com.facebook.widget']/class[@name='FacebookFragment']" name="visibility">public</attr>
  <attr path="/api/package[@name='com.facebook.widget']/class[@name='SimpleGraphObjectCursor']" name="visibility">public</attr>
  <attr path="/api/package[@name='com.facebook.widget']/interface[@name='GraphObjectCursor']" name="visibility">public</attr>

After creating this attempt, I reached the point where I was getting several errors in the class GraphObject.SectionAndItem.

Error   41  Argument 1: cannot convert from 'Com.Facebook.Widget.GraphObjectAdapter.SectionAndItem.Type' to 'System.IntPtr' E:\Android\FacebookBinding\FacebookBinding\FacebookBinding\obj\Debug\generated\src\Com.Facebook.Widget.GraphObjectAdapter.cs    345 64  FacebookBinding
Error   39  Operator '!=' cannot be applied to operands of type 'Com.Facebook.Widget.GraphObjectAdapter.SectionAndItem.Type' and 'System.Type'  E:\Android\FacebookBinding\FacebookBinding\FacebookBinding\obj\Debug\generated\src\Com.Facebook.Widget.GraphObjectAdapter.cs    344 9   FacebookBinding
Error   47  Operator '==' cannot be applied to operands of type 'Com.Facebook.Widget.GraphObjectAdapter.SectionAndItem.Type' and 'System.Type'  E:\Android\FacebookBinding\FacebookBinding\FacebookBinding\obj\Debug\generated\src\Com.Facebook.Widget.GraphObjectAdapter.cs    381 9   FacebookBinding
Error   40  The best overloaded method match for 'Android.Runtime.JNIEnv.CreateInstance(System.IntPtr, string, params Android.Runtime.JValue[])' has some invalid arguments E:\Android\FacebookBinding\FacebookBinding\FacebookBinding\obj\Debug\generated\src\Com.Facebook.Widget.GraphObjectAdapter.cs    345 17  FacebookBinding

To get around these problems, I removed the nodes associated with these problems.

  <remove-node path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectAdapter.SectionAndItem']"/>
  <remove-node path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectAdapter.SectionAndItem.Type']"/>

Now the binding can be successfully built. You might think that I can create and deploy my application now, another problem arises. After adding the file .jarand file .dllto my application, I get these errors when creating.

Error   62   package com.facebook.widget.GraphObjectAdapter does not exist
        com.facebook.widget.GraphObjectAdapter.DataNeededListener
    E:\Android\FacebookBinding\FacebookBinding\FacebookTest\obj\Debug\android\src\mono\com\facebook\widget\GraphObjectAdapter_DataNeededListenerImplementor.java    8   41  FacebookTest
Error   63   package com.facebook.widget.GraphObjectPagingLoader does not exist
        com.facebook.widget.GraphObjectPagingLoader.OnErrorListener
    E:\Android\FacebookBinding\FacebookBinding\FacebookTest\obj\Debug\android\src\mono\com\facebook\widget\GraphObjectPagingLoader_OnErrorListenerImplementor.java  8   46  FacebookTest

Now I am at a loss how to do this. Any suggestions or comments on any of the steps to get to this place?

+5
2

Xamarin Mono for Android 4.7.x, java-, Facebook .jar. - , GraphObject. , Metadata.xml, .jar, .

0

xamarin IDE, dll facebook sdk

http://components.xamarin.com/

0

All Articles