How do I post an Open Graph action to a Facebook p

2019-06-21 03:40发布

问题:

With timelines rolling out to Fan and Business pages, I would like to be able to publish actions to our Business page timeline. I can't figure out how to do that. Any guidance?

When I try to post to the page (with an unapproved og action), I get:

{"error":{"message":"(#100) The Action Type ACTION_TYPE is not approved, so app APP_NAME_SPACE can only publish to administrators, developers, and testers of the app. User PAGE_ID is not one of those roles.","type":"OAuthException","code":100}

回答1:

You cannot post an OG action to a page

Actions are defined through the App Dashboard. Once an application has defined the types of actions that it publishes, the application can invoke the Graph API to publish action instances to Open Graph -- this connects the current user with an appropriate object instance via the action

-- http://developers.facebook.com/docs/opengraph/actions/

There is no documentation on saying it's not possible because documentation usually shows what is possible. Listing all the negatives of a feature isn't something I think Facebook does.



回答2:

I would like to share how far I came:

  1. got actions approved by Facebook.
  2. published actions to page with user access token => works accept that the actions do not appear on the timeline of the page, they appear on the user's timeline instead.
  3. fetched page access token (scope: publish_actions, manage_pages) and published actions to page with page access token => failed with "An unknown error has occurred." of type: "OAuthException".

My conclusion: It's not possible.



回答3:

Actually I came up with a work-around solution which might be useful for you, but you have to have a Twitter account..

  • First, you need to create a Twitter account if you do not have one.
  • Then, you need to connect your twitter account with your facebook profile or any page admin profile (Twitter -> Settings -> Apps). And check post to my Facebook page: and select your page.
  • Using the twitter oauth_token and oauth_token_secret of the Twitter account, you can tweet the post you want.
  • The post will be automatically posted on your Facebook page

Of course there are some drawbacks, like having the twitter account, and the links will appear on your Facebook page shorten via Twitter [http://t.co/], but I think it is the only solution.