Error using news.reads Open Graph action

2.2k Views Asked by At

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.

3

There are 3 best solutions below

0
On

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.

1
On

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.

0
On

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);
                }
        });
    }