IOS Facebook SDK - Post Open Graph and show on Timeline without clicking Activity Log

落花浮王杯 提交于 2019-11-26 16:48:57

问题


From the Facebook SDK sample code, when successfully post the open graph object to timeline, you have to click Show on Timeline in the Activity Log on Facebook website.

How to ignore these steps and explicit share your OG to timeline?

----------------------------------------The Answer Below:----------------------------------------

Just add one more code to your FBOpenGraphAction Object:

id<FBOpenGraphAction> action = (id<FBOpenGraphAction>) [FBGraphObject graphObject];
[action setObject: @"true" forKey: @"fb:explicitly_shared"];  // This is the key point!

And you should enable the 'explicity shared' setting for the open graph action in the Facebook Developer App Dashboard in the website.

For more details, look at the Document about Explicit Sharing


回答1:


You can use Scocial.framework for to directy post on facebook. It just use users built in facebook account associated with ios. And you will be able to post on timeline.



来源:https://stackoverflow.com/questions/17310892/ios-facebook-sdk-post-open-graph-and-show-on-timeline-without-clicking-activit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!