Posting to a Facebook page using the Graph API - returns an identifier but does not appear

I am trying to use the Facebook C # SDK to post to a stream on Facebook, but I fail. This is what my code looks like:

var app = new Facebook.FacebookApp(_accessToken); var parameters = new Dictionary<string, object> { { "message" , promotionInfo.TagLine }, { "name" , promotionInfo.Title }, { "description" , promotionInfo.Description }, { "picture" , promotionInfo.ImageUrl.ToString() }, { "caption" , promotionInfo.TargetUrl.Host }, { "link" , promotionInfo.TargetUrl.ToString() }, { "type" , "link" } }; var response = app.Post(_targetId + "/feed", parameters); 

I checked, and I see that the request in Fiddler goes to Facebook, and I return the ID, however, when I try to view this identifier in http://graph.facebook.com/[parentid]_[postid]

I just get a page with a β€œlie” on it, and the message also does not appear on the Facebook page itself. If I simply enter a random postid that does not exist, I get "Some of the aliases you requested do not exist."

AccessToken has the right to use access to publish_stream and offline publications (generated using this URL )

Any ideas what could go wrong? Thanks

Refresh . I have to add, this works fine if I change _targetId to "I" (i.e. send directly to my own profile page)

+4
source share
3 answers

This is just an idea, but try it after getting the extended read_stream permission.

I know from experience that you can use the identifier returned to delete the message, but without read_stream I don’t think you can get it (and more interesting things like comments)

0
source

To post to a Facebook page, you need to request manage_pages permission. also you should use PAGE access_token, not user access_token.

0
source

Source: https://habr.com/ru/post/1338123/


All Articles