IOS Facebook SDK - 发布开放图表并在时间轴上显示而无需单击活动日志 [英] IOS Facebook SDK - Post Open Graph and show on Timeline without clicking Activity Log

查看:22
本文介绍了IOS Facebook SDK - 发布开放图表并在时间轴上显示而无需单击活动日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 Facebook SDK 示例代码来看,当成功将打开的图形对象发布到时间线时,您必须在 Facebook 网站的活动日志中点击在时间线上显示.

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

如何忽略这些步骤并将您的 OG 明确分享到时间线?

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

推荐答案

我已将此答案移出@isaacselement 问题.

I've moved this answer out of @isaacselement question.

只需在您的 FBOpenGraphAction 对象中再添加一个代码:

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!

并且您应该在网站的 Facebook 开发者应用仪表板中为开放图操作启用'明确共享'设置.

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

有关详细信息,请查看关于显式共享的文档

这篇关于IOS Facebook SDK - 发布开放图表并在时间轴上显示而无需单击活动日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆