简体   繁体   中英

How to get access_token for a client_id, redirect_uri, code and client secret for Facebook application integration, C#?

My facebook integration used to work but for a few days it is not any longer? As I have read around and found that I need to do a webrequest now to get access_token. https://graph.facebook.com/oauth/access_token?client_id= {0}&redirect_uri=&client_secret={1}&code={2} The issue is that I don't receive any response. Have you guys implemented a way how to receive access token? I use debugger tool from facebook using this request I make and I receive 400 error bad request. This is the link: https://graph.facebook.com/oauth/access_token?client_id=234035623293956&redirect_uri=https://www.hotelopro.com/TestFb.aspx&client_secret=38c373c3f3723d793f58cb745c9b0364&code=efa62750b66f1a2207cafdf6.1-100002637731450|qn9fIozBUHBYuNchC_f4HLXFbiI If it helps you. PS: I saw a similar question here Facebook Access Token from Website cookie using new OAuth and C# but without answer :-?

Do not use the "official" C# library. The code is outdated and not updated!

Try http://facebooksdk.codeplex.com/ (I worked in C #. NET 4 - everything without problems).

I would recommend using the official facebook c# sdk. The project is here: https://github.com/facebook/csharp-sdk

The facebook release blog is here: https://developers.facebook.com/blog/post/395/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM