gpt4 book ai didi

facebook - 链接到其他用户的 Open Graph 自定义操作

转载 作者:行者123 更新时间:2023-11-30 05:18:07 24 4
gpt4 key购买 nike

我对测试版 Open Graph 的内容有疑问。

我正在查看的文档是这个 https://developers.facebook.com/docs/beta/opengraph/我成功地定义了自定义对象和操作。但是,我无法弄清楚如何将当前用户与其他用户联系起来。例如,假设我定义了一个自定义 Action “踢”。我希望当前用户能够“踢”他/她的一个 friend 。我能想到的最接近的对象是“个人资料”,但是当我传递 user_id、“http://www.facebook.com/profile.php?id=”或 http://graph.facebook.com/ 时, 它不起作用。

这是我尝试过的请求

POST https://graph.facebook.com/me/myapp:kick?access_token=abc&profile=http%3A%2F%2Fwww.facebook.com%2F123POST https://graph.facebook.com/me/myapp:kick?access_token=&profile=123POST https://graph.facebook.com/me/myapp:kick?access_token=abc&profile=http%3A%2F%2Fwww.facebook.com%2Fprofile.php%3Fid%3D123POST https://graph.facebook.com/me/myapp:kick?access_token=abc&profile=http%3A%2F%2Fgraph.facebook.com%2F123

这是我得到的回应

{"error":{"message":"An unexpected error has occurred. Please retry your request later.","type":"OAuthException"}}

最佳答案

给出的配置文件适用于外部 网站。他们称之为外部配置文件。极具误导性的术语。

Kicked a website

如你所见,我使用了以下内容

curl -F 'access_token=TOKEN' \
-F 'profile=http://graph.facebook.com/zuck' \
'https://graph.facebook.com/me/MYAPP:kick'

它给出了上面的内容。

猜想您可以使用 Facebook 用户的元信息填充外部配置文件,它会正常显示(例如,我可以发送配置文件 URL facebook.com/zuck),但看起来向后,低效且不符合预期用途。

例如向它提供我的链接。

curl -F 'access_token=TOKEN' \
-F 'profile=http://facebook.com/username' \
'https://graph.facebook.com/me/MYAPP:kick'

Kicked myself

但问题是……我不是音乐家。

虽然在聚合 View 中看起来确实不错。

Aggregation

这很有趣/很奇怪,因为这张图片中显示的对象之一是 Facebook 个人资料,所以您会认为他们会举一个 Facebook 个人资料作为对象的例子。

Graph presentation

虽然他们说

We are now extending the Open Graph to include arbitrary actions and objects created by 3rd party apps and enabling these apps to integrate deeply into the Facebook experience

这很可能意味着他们希望您在 Facebook 之外创建任意对象。

你还能链接到其他用户吗?
是的,但是通过使用 tags=FacebookID1,FacebookID2 进行标记,但它将采用以下形式

phwd kicked a musician with Friend1 and Friend2 on [APP NAME]

关于facebook - 链接到其他用户的 Open Graph 自定义操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7601998/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com