开发者

Facebook Graph Feed Post Not Including Message

I have the following snippet to post to a user's feed on Facebook:

require 'httparty'

token = "..."
message = "..."
url = URI.escape("https://graph.facebook.com/me/feed?access_token=#{token}")
response = HTTParty.post(url, body: { message: message })

This posts to the wall, but no message is included. Any开发者_如何学C ideas what's wrong?

Edit:

I tried changing out the message for a caption or description and both failed as well.


Solution is to change HTTParty from using body to query for posting form data:

require 'httparty'

token = "..."
message = "..."
url = URI.escape("https://graph.facebook.com/me/feed?access_token=#{token}")
response = HTTParty.post(url, query: { message: message })


Based on the link cited above, it appears message functionality has been completely removed from the feed connection since July 12.

This is a problem for my current app as it is specifically a public opinion site. Asking users to express their opinions authentically is an important part of our design and we'd like to give them the option to post that to their feeds on Facebook as well.

Per the Facebook terms of use IV.2, "You must not pre-fill any of the fields associated with the following products, unless the user manually generated the content earlier in the workflow." The new change appears to change the terms of service: in my use, I am specifically asking the user to generate the content earlier in the workflow, but I still can't use it to pre-fill the feed dialog.

Anyone have any ideas or insight?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜