tschellenbach / Django-facebook

Facebook open graph api implementation using the Django web framework in python
http://www.mellowmorning.com/
Other
1.43k stars 543 forks source link

Facebook integration with asp.net #563

Open vinodkus opened 8 years ago

vinodkus commented 8 years ago

When I integrate facebook with asp.net When I give http://localhost:2111/ in Valid OAuth redirect URIs. It is working fine but I have to do with live URL site. At that time i am giving http://ipaddress:1192/JBD/CNACPmt/ in Valid OAuth redirect URIs.

// ipaddress has some valid address

But it gives error like Warning URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.

when I clicked okay then it gives error like

Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

In method

protected List GetFacebookUserData(string code) { // Exchange the code for an access token

Uri targetUri = new Uri("https://graph.facebook.com/oauth/access_token?client_id=" + ConfigurationManager.AppSettings["FacebookAppId"] + "&client_secret=" + ConfigurationManager.AppSettings["FacebookAppSecret"] + "&redirect_uri=http://ipaddress:1192/JBD/CNACPmt/account_summary.aspx&code=" + code);


// some more code

} So what is the issue

please help me

Thanks In advance