Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid facebook post api not working
    primarykey
    data
    text
    <p>I am using android facebook api for publishing on users feed.</p> <p>Login is working successfully, but the function publishstory is not working. I have the code below.</p> <pre><code>private void publishStory() { Session session = Session.getActiveSession(); if (session != null){ // Check for publish permissions List&lt;String&gt; permissions = session.getPermissions(); if (!isSubsetOf(PERMISSIONS, permissions)) { pendingPublishReauthorization = true; Session.NewPermissionsRequest newPermissionsRequest = new Session .NewPermissionsRequest(this, PERMISSIONS); session.requestNewPublishPermissions(newPermissionsRequest); return; } Bundle postParams = new Bundle(); postParams.putString("name", "Facebook SDK for Android"); postParams.putString("caption", "Build great social apps and get more installs."); postParams.putString("description", "The Facebook SDK for Android makes it easier and faster to develop Facebook integrated Android apps."); postParams.putString("link", "https://developers.facebook.com/android"); postParams.putString("picture", "https://raw.github.com/fbsamples/ios-3.x-howtos/master/Images/iossdk_logo.png"); Request.Callback callback= new Request.Callback() { public void onCompleted(Response response) { JSONObject graphResponse = response .getGraphObject() .getInnerJSONObject(); String postId = null; try { postId = graphResponse.getString("id"); } catch (JSONException e) { Log.i("error", "JSON error "+ e.getMessage()); } FacebookRequestError error = response.getError(); if (error != null) { Toast.makeText(FacebookActivity.this.getApplicationContext(), error.getErrorMessage(), Toast.LENGTH_SHORT).show(); } else { Toast.makeText(FacebookActivity.this .getApplicationContext(), postId, Toast.LENGTH_LONG).show(); } } }; Request request = new Request(session, "me/feed", postParams, HttpMethod.POST, callback); RequestAsyncTask task = new RequestAsyncTask(request); task.execute(); } } </code></pre> <p>the problem is it executes till line </p> <pre><code>session.requestNewPublishPermissions(newPermissionsRequest); return; } </code></pre> <p>and then comes out of the function on return without showing any popup. Any ideas?</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