Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize stream.publish dialog #25

Closed
slup opened this issue Jun 8, 2010 · 1 comment
Closed

Customize stream.publish dialog #25

slup opened this issue Jun 8, 2010 · 1 comment

Comments

@slup
Copy link

slup commented Jun 8, 2010

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.

@slup
Copy link
Author

slup commented Jun 9, 2010

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");

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant