I am developing a desktop application that will interface with FB. FB insists that you provide a Site URL. Since this is a desktop application this doesn't really make sense. I set the site url to 'localhost'.
I just get the following error when I put 'localhost' in the url string
API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri isn't an absolute URI. Check RFC 3986.
This looks like a pretty common error but I don't see any examples of how desktop applications should handle this site url requirement.
Can someone help me out?
Thanks
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.
In your app settings on https://developers.facebook.com/sa/apps/<my-app-id> , make sure that you add the Facebook Login product. Then under "Client OAuth Settings" enter the URL in the "Valid OAuth redirect URIs" box.
Make sure the URL of your site is defined when configuring the Facebook application. Create an OAuth2 Token asset. On the Details screen, enter the ID and Secret provided to you by Facebook in the Client ID and Client Secret fields. In the Authorisation Endpoint field, enter https://graph.facebook.com/oauth/authorize.
Pays to read the documentation to the end :)
Our OAuth 2.0 implementation does not include explicit desktop app support. However, if your desktop app can embed a web browser (most desktop frameworks such as .NET, AIR and Cocoa support embedding browsers), you can use the client-side flow with one modification: a specific redirect_uri. Rather than requiring desktop apps to host a web server and populate the Site URL in the Developer App, we provide a specific URL you can use with desktop apps: https://www.facebook.com/connect/login_success.html.
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