使用 news.reads Open Graph 操作时出错

发布于 2024-12-23 03:42:21 字数 974 浏览 4 评论 0原文

我正在尝试新的开放图操作来构建华盛顿邮报社交阅读器等功能。我创建了“文章”类型的 OG 页面并向其发布了“news.reads”操作。我使用 OG 调试器验证了这些页面是有效的 OG 对象。并且用户授予了publish_actions权限。

我使用 HTTP POST 发布一个操作到:

https://graph.facebook.com/me/news.reads?article=((article link))&access_token=...

我从 Facebook 收到此错误:

type = u'OAuthException', message = u'An unknown error has occurred.'

因此我再次尝试相同的操作,这次我收到另一个错误:

type = 'OAuthException' 
message = '(#3501) User is already associated to a article object on a unique
action type Read. Original Action ID: ((action id))'

其中 ((action id)) 是一个有效的操作 ID,我将其可以通过查看来验证:

http://graph.facebook.com/((action id))

这给了我有关该操作的详细信息。我在不同的页面和不同的用户上尝试了几次上述操作,都是相同的流程:未知错误,重复操作错误。然而,看起来该操作正在创建:

  1. 我在用户时间轴上没有看到它。
  2. 我在活动日志中没有看到它。

我缺少什么?

注意如果我使用自己的应用程序特定名词和动词执行上述操作,一切都会按预期进行。但我有兴趣使用内置的名词和动词来更好地聚合用户时间线。

I'm trying out the new Open Graph actions to build functionality like the Washington Post Social Reader. I created OG pages of type "article" and posted "news.reads" action to them. I verified that the pages are valid OG objects using the OG debugger. And the user granted the publish_actions permissions.

I publish an action with an HTTP POST to:

https://graph.facebook.com/me/news.reads?article=((article link))&access_token=...

I get this error back from Facebook:

type = u'OAuthException', message = u'An unknown error has occurred.'

So I try the same action again, and this time I get this other error:

type = 'OAuthException' 
message = '(#3501) User is already associated to a article object on a unique
action type Read. Original Action ID: ((action id))'

Where ((action id)) is a valid action ID, which I can verify by viewing:

http://graph.facebook.com/((action id))

Which gives me details about the action. I tried the above several times with different pages and different users, and it's the same flow: unknown error, duplicate action error. It looks like the action is being created, however:

  1. I don't see it on the user timeline.
  2. And I don't see it in the Activity Log.

What am I missing?

Note If I do the above using my own app-specific nouns and verbs, everything works as expected. But I'm interested in using the built-in nouns and verbs for better aggregation on users timelines.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

Bonjour°[大白 2024-12-30 03:42:21

如果您的操作未经 Facebook 批准,则不会向最终用户显示。只有应用程序设置的“角色”部分中列出的人员才能发布并查看活动日志中的操作(例如管理员、开发人员和测试人员)。

尝试使用测试用户测试操作。从“角色”页面创建一个新的测试用户并使用他们登录。查看操作是否已发布并正确显示在活动日志中。

If you action has not been approved by Facebook, it won't show up to end-users. Only those listed in the 'Roles' section of the Application Settings will be able to publish and see the actions in the Activity log (e.g. administrators, developers and testers).

Try testing the action with a Test User. Create a new test user from the 'Roles' page and login with them. See if the action is published and appears correctly on the Activity log.

烟花肆意 2024-12-30 03:42:21

这是我用来发布视频观看的内容,您可以尝试执行相同的操作:

 function postWatch()
    {
        FB.api('/me/video.watches' + 
                    '?video=<?php echo $url; ?>','post',
                    function(response) {
            if (!response || response.error) {
                   alert(response.error);
            } else {
                //alert('Post was successful! Action ID: ' + response.id);
                }
        });
    }

Here's what I'm using to post video watches, you can try to do the same:

 function postWatch()
    {
        FB.api('/me/video.watches' + 
                    '?video=<?php echo $url; ?>','post',
                    function(response) {
            if (!response || response.error) {
                   alert(response.error);
            } else {
                //alert('Post was successful! Action ID: ' + response.id);
                }
        });
    }
小情绪 2024-12-30 03:42:21

内置的读取操作被定义为“唯一”,而您的操作类型则不是(请参阅操作编辑屏幕中的“高级”部分)。您不能使用同一对象 url 提交两次“阅读”。

The built in Read action is defined as "unique" while your action type is not (see 'advanced' section in the action edit screen). You you can't submit Read with the same object url twice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文