Open Graph - Custom Action & Object - facebook

I'm trying to implement the Open Graph custom action and object.
I'm using this tutorial as a reference https://developers.facebook.com/docs/opengraph/tutorial/
Things seem to work fine, and I'm able to use the curl command to post an action on my timeline.
However, when trying to do it from the site, the popup that request for permission doesn't have the open graph action request, even though I request for publish_actions permission.
What am I missing? Do I have to publish the action first before it will show up on the referral dialog? Note that under the app setting, if I go to Auth Dialog > advanced and do "Preview Referral Dialog", the popup dialog looks correct.

If you are an Admin or Developer of the application, you will be able to request permission to publish_actions before the action is approved. Try using the API Explorer tool to test the request you are making from the website: https://developers.facebook.com/tools/explorer/
Are you removing the application before trying to test the action from your site? If you have already approved the app and the requested permission, you won't see the Dialog box again.
Post up the code you are using to request the publish_actions permission. Also, make sure 'Enhanced Auth Dialog' is enabled from the 'Advanced' Settings for your App.

Related

Facebook OpenGraph Action not being approved

I'm trying to submit for my application a Facebook open graph action of Read. But when i submit it i got the following response.
We are unable to test this action according to the usage instructions
you provided. Please provide thorough reproduction instructions and
link(s) to a specific URL where we can trigger the action. You should
also test your action to ensure you can successfully publish actions
back to the timeline of the test user named Auth Dialog Preview User.
Once you have made these changes, re-submit your action.
I can understand the first part, but I don't understand the following parts.
You should also test your action to ensure you can successfully
publish actions back to the timeline of the test user named Auth
Dialog Preview User. Once you have made these changes, re-submit your
action.
What does this means and how can I fix them? Thanks
It means you have to use the automatically created test user for your app called 'Auth Dialog Preview User' and post some of the actions from that user's account.
https://developers.facebook.com/docs/test_users/ explains how test users work in general, you can log in as them via the app settings interface

Publish custom facebook action on timeline as a Page

I have created a custom object and custom action with Open Graph, and they have already been approved by facebook. I am able to publish this custom action as a user, but not as a page.
The steps I follow are:
The user authorize the app via the login dialog, granting the publish_actions permission
I exchange the short-lived user_access_token for a long-lived one.
I fetch https://graph.facebook.com/me/accounts?access_token=... and get the page_access_token
I try to publish a custom action on the page timeline on behalf of the page, without success, getting an enigmatic OAuthException with message "An unknown error has occurred."
The auth dialog is correctly asking all the permissions, and posting the same custom action on a user wall on behalf of the user works properly.
Is this a bug or I am missing something? Anyone managed to publish a custom action AS A PAGE?
I don’t think you can undertake actions as a page – actions are ment to be undertaken by real people …

Automatically activate users' timeline on login

I am using the JavaScript SDK to login in the user on my website via Facebook, requiring the publish_actions permission. If I am getting it right, Open Graph stories published by using publish_actions are only visible for users who have their timeline enabled.
Is it possible to automatically activate the users' timeline after he logged in to my application and gave me the publish_actions permissions. I've seen authentication dialogs around the web where applications request the publish_actions permission and after granting the permission and logging in, the user automatically has the new timeline enabled.
I already searched a lot, but unfortunately I could not find anything in the developer documentation about how to do that.
How do I accomplish this?
If you request the publish_actions permission from the user and you have the action approved by Facebook, the message you talk about will appear in the login popup. Facebook automatically adds this message in as the features are only available with the new timeline profile. There isn't a setting you need to configure to add this message in.
What you describe is the intent of modifying user settings, and you can't do that.

How to get existing users using Timeline

Once Timeline goes live, how do we get our users to give publish_actions permission?
We've added this to our Auth Dialog settings, should we redirect (existing-)users back to that dialog once timeline goes live to get publish_actions permission, or will that happen automatically?
Also, it seems the auth dialog happens automatically now, without any custom FB code required, if they don't have the app allowed.

How do I request Facebook login/authorization upon application (Page Tab) installation?

I have an app that's installed as a Tab in a Facebook Page. Installation is straight forward, but unfortunately does not prompt the installer (i.e. the page admin) for authorization (ex. for "email, publish_stream" scopes) unless the user then "Logs In" to the app. My goal is that the person installing the app will be immediately prompted to authorize certain permissions so that the app can post to their wall, etc.
Is there a way to request permissions as part of the installation process? Ideally, a user would install the app in a Tab and, as part of the installation process, be prompted for permissions. Calling FB.login does not appear to work since pop-ups are blocked.
I'm using Facebook's OAuth2 and Javascript APIs. The app is backed by a (Rails) server, so I could switch to using server-based authentication, though I'd prefer not to.
I've looked through a variety of similar posts, but all of them are using legacy code (which doesn't work with Facebook's OAuth2 support) or require the user to click the Log In button:
How to show the Extended Permission Dialog in FB using new Graph API?
How do I get my Facebook application to automatically ask for the required permissions post installation
Facebook iframe application after authorization redirect to facebook page tab
How to Detect a user declining a permissions request dialog that redirects to a Facebook TAB application
Any suggestions?