当前位置: 动力学知识库 > 问答 > 编程问答 >

Facebook API - What should the redirect URL be for a desktop/native application?

问题描述:

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

网友答案:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: