Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Facebook SDK and URL Methods form successful Friends Dialog, but cannot commit
    text
    copied!<p>This is one that I'm beginning to think is a bug, please, Please prove me wrong:</p> <p>I want to programmatically friend a user on Facebook; they are only and most certainly someone the person knows IRL.</p> <p>The following three solutions all have the same result: a successful friends dialog--meaning the profile name, picture, statement indicating the action( to friend someone ), and refusal/confirm buttons; pressing 'confirm' is the problem: it leads to a Facebook error presented in the standard fb UI saying "Sorry, something went wrong We're working on getting this fixed as soon as we can". My user is logged in and the fb app id( fb_app_id ) is golden, or the fragment's parent activity would not be called, my to-be-friended user id ( Id ) is also golden, confirmed by their profile picture showing up both in my app and in the friends dialog, the action "friends/" is correct--'friends/?' gives me a good ol' "not found" error--and the OnCompleteListener works fine even around the message.</p> <p>First way is with the SDK, my preferred if it worked:</p> <pre><code>Bundle params = new Bundle( ); params.putString( "id", Id ); WebDialog requestsDialog = ( new WebDialog.Builder( this.getActivity( ), getString( R.string.fb_app_id ), "friends/", params ) .setOnCompleteListener( new CompleteListener( ) ) .build( ) ); requestsDialog.show( ); </code></pre> <p>Save the explicit action call, that looks good, doesn't it? It certainly gets me to the confirmation dialog; second way is quick and dirty, but it should work:</p> <pre><code>String requestUrl = "https://www.facebook.com/dialog/friends/?id="+ Id+"&amp;app_id="+getString( R.string.fb_app_id )+ "&amp;redirect_uri=http://www.facebook.com"; WebDialog requestDialog = new WebDialog( this.getActivity( ), requestUrl ); requestDialog.show( ); </code></pre> <p>But it doesn't; same quasi-successful result. The third way was me just checking to make sure I wasn't an idiot, and is essentially the suggestion in this post <a href="https://stackoverflow.com/questions/5372456/facebook-friends-dialog-returns-unknown-method-error">Facebook friends dialog returns &quot;Unknown method&quot; error</a> but with WebDialogs ( my OnCompleteListener implementation ) instead of the deprecated library. Same thing, same message.</p> <p>It's not really an error message that's /for/ me, you know? Is this a deprecated API call? Is the error message literally correct and the good folks at fb are aware of this? Is there some param i'm actually missing here? It's not like they aren't signed in! I'm kind of at my wit's end on this one, thanks in advance for the help/advice/calming words. -AnB</p> <p>P.S. 'friended' looks really funny when you write it out. AB</p>
 

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