You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I customize the publish dialog?
I managed to make a customized feed post by using the Facebook.request(String graphPath, Bundle parameters, String httpMethod) method:
mFacebook.request("/me/feed", parameters, "POST"));
this works as expected, but now I'd like to let the user add a "message" to those parameters using the stream.publish dialog.
At first I tried to call the dialog with "/me/feed" instead of "stream.publish" and the same parameters I used for the request, which wasn't working as I thought, the dialog just said "Error with [App]".
Thus I suppose I can't use the graph-API in the dialog?
Further trying I called dialog with another parameters Bundle:
But the publish dialog just ignores them, publishing a message (without any extras) still works though. Also adding a key named "message" to parameters works as expected, filling the message input field with the given value.
The text was updated successfully, but these errors were encountered:
Solved: Put the parameters in a JSON object and encode it to a URL, see: Facebook Connect for Mobile Web
parameters.putString("attachment", "%7B%22name%22%3A%22app+name%22%2C%22caption%22%3A%22app+caption%22%7D");
How can I customize the publish dialog?
I managed to make a customized feed post by using the Facebook.request(String graphPath, Bundle parameters, String httpMethod) method:
mFacebook.request("/me/feed", parameters, "POST"));
parameters:
parameters.putString("link", "...");
parameters.putString("name", "...");
parameters.putString("caption", "...");
parameters.putString("source", "...");
parameters.putString("attribution", "...");
this works as expected, but now I'd like to let the user add a "message" to those parameters using the stream.publish dialog.
At first I tried to call the dialog with "/me/feed" instead of "stream.publish" and the same parameters I used for the request, which wasn't working as I thought, the dialog just said "Error with [App]".
Thus I suppose I can't use the graph-API in the dialog?
Further trying I called dialog with another parameters Bundle:
attachment.putString("caption", "...");
attachment.putString("name", "...");
attachment.putString("href", "...");
parameters.putBundle("attachment", attachment);
But the publish dialog just ignores them, publishing a message (without any extras) still works though. Also adding a key named "message" to parameters works as expected, filling the message input field with the given value.
The text was updated successfully, but these errors were encountered: