开发者

Name parameter ignored in Facebook feed dialog

开发者 https://www.devze.com 2023-04-10 04:13 出处:网络
I try opening a simple dialog from 开发者_Python百科my iOS app to post something on a user\'s wall. However it seems the \"name\" parameter is completely ignored.

I try opening a simple dialog from 开发者_Python百科my iOS app to post something on a user's wall. However it seems the "name" parameter is completely ignored.

Here is the code, I use the Facebook SDK from Github, pulled the version yesterday.

NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"This is the name",@"name",nil];
[facebook dialog:@"feed"
        andParams:params
      andDelegate:self];

The dialog shown only shows:

"Post to your wall"

"Write something..."

the text box

"via MyApp"

When actually posting the post is completely empty. Why is the "name" parameter completely ignored?


Seems I've found the solution. It works if you do not pass a description, but pass a caption argument instead. Then the name appears, the caption text below, and the parsed link text below that


For some background, the name parameter is attached to a link you attach to the post, see the properties description section https://developers.facebook.com/docs/reference/dialogs/feed/. So add a link parameter alongside the name.

As mentioned in a comment, even though the name parameter is not visible in the preview dialog it will be posted and show up on Facebook, providing you also provide a link parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号