I'm using flash GrahpAPI_web sdk which is a as3 flash extension the communicate with the Javascript SDK.
Regardless, I'm trying to get the oauth dialog to show up as a popup, as popup's. When I run the FB.init followed by FB.login call's, the resulting oauth URL includes a redirect that I didn't not specify, nor can I see clearly how to specify it.
Here's a friend view of the oauth URL
https://www.facebook.com/dialog/oauth
api_key=<APP_ID>
app_id=<APP_ID>
client_id=<APP_ID>
display=popup
domain=app.local.MYAPP.com
locale=en_US&origin=1
redirect_uri=http://static.ak.facebook.com/connect/xd_arbiter.php?version=8#cb=f35f1a383cdde0a
origin=http%3A%2F%=app.local.MYAPP.com%2Ff38af6b0241d006
domain==app.local.MYAPP.com
relation=opener
frame=fc22754c0e4d
response_type=token,signed_request
scope=read_stream, publish_stream
sdk=joey
The problem is the redirect_uri which I didn't specify. If I replace with app.local.MYAPP.com, it appears to work correctly.
How can I get FB.login to implement the correct redirect_uri?
You need to register as facebook developer and create you app there. Once you have your web app registered you can go to your app and click on add product. Add Facebook Login. Then enable Web OAuth Login and add your localhost in the textfield below and save, you should be able to access it.
Due to the security changes made to Facebook, it's no longer possible to turn off this setting. If you are using HTTPS, you will need to enter the URI with the port number as well i.e. This last point is not related to the recent Facebook app changes.
OAuth2 dominates the industry as there is no other security protocol that comes close to the adoption of OAuth2. In case you're wondering what OAuth2 is, it's the protocol that enables anyone to log in with their Facebook account. It powers the “Log in with Facebook” button in apps and on websites everywhere.
Your redirect URI will typically have the format https://engage-app name.rpxnow.com/facebook/callback. For example, if your Engage app has the name my--test-app, your redirect URI would be https://my-test-app.rpxnow.com/facebook/callback. Show activity on this post.
I had trouble a similar, so I did it a little differently. Maybe something like this will work for you. I used this javascript:
window.location = encodeURI("https://www.facebook.com/dialog/oauth?
client_id=<APP_ID>
&redirect_uri=<REDIRECT_URL>
&response_type=token
&scope=publish_stream");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With