Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook v3 sdk monodroid binding
    primarykey
    data
    text
    <p>Has anyone tried to create a new monodroid binding for version 3 of the Facebook sdk? I've been using the older version of the Facebook sdk created with <a href="https://github.com/xamarin/monodroid-samples/tree/master/Facebook" rel="nofollow">Monodroid Facebook Binding</a>. But the new Facebook sdk has almost all of those methods as deprecated.</p> <p>I'm having trouble setting up the new binding, basically the <code>com.facebook.android.Facebook</code> class is now deprecated and the <code>Facebook.Authorize</code> is replaced with <code>Session</code>. I'm able to create a jar file of the new facebook sdk, but the <code>Session</code> class is not showing up in the object browser in visual studio when looking at the .dll. The <code>Session</code> class is public and implements <code>java.io.Serializable</code> which is included in the <code>Mono.Android</code> reference. Any help or suggestions would be appreciated.</p> <p>edit: After messing around a few days with this I'm able to get past this issue with a work around that doesn't actually solve my problem, removing the node in <code>Metadata.xml</code>.</p> <pre><code>&lt;remove-node path="/api/package[@name='com.facebook']/class[@name='Session.OpenRequest']/method[@name='setPermissions']"/&gt; </code></pre> <p>This brings about other problems, which can be solved by adding some more <code>&lt;attr&gt;</code> tags.</p> <pre><code> &lt;remove-node path="/api/package[@name='com.facebook.model']/class[@name='PropertyName']"/&gt; &lt;attr path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectAdapter']" name="visibility"&gt;public&lt;/attr&gt; &lt;attr path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectPagingLoader']" name="visibility"&gt;public&lt;/attr&gt; &lt;attr path="/api/package[@name='com.facebook.widget']/class[@name='FacebookFragment']" name="visibility"&gt;public&lt;/attr&gt; &lt;attr path="/api/package[@name='com.facebook.widget']/class[@name='SimpleGraphObjectCursor']" name="visibility"&gt;public&lt;/attr&gt; &lt;attr path="/api/package[@name='com.facebook.widget']/interface[@name='GraphObjectCursor']" name="visibility"&gt;public&lt;/attr&gt; </code></pre> <p>After building this attempt I got to a point where I was getting multiple errors in the <code>GraphObject.SectionAndItem</code> class.</p> <pre><code>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 </code></pre> <p>To get around those issues I removed the nodes associated with these issues.</p> <pre><code> &lt;remove-node path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectAdapter.SectionAndItem']"/&gt; &lt;remove-node path="/api/package[@name='com.facebook.widget']/class[@name='GraphObjectAdapter.SectionAndItem.Type']"/&gt; </code></pre> <p>Now the binding is able to be built successfully. You'd think that I would be able to build and deploy my application now, another issue arises. After adding the <code>.jar</code> file and the <code>.dll</code> file to my application I get these errors when building.</p> <pre><code>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 </code></pre> <p>I'm at a loss now as how to proceed here. Any suggestions or comments to any of the steps to get to this spot?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload