facebook-graph-api

Why does the Facebook API use POST for updating records?

ぃ、小莉子 提交于 2021-02-10 23:43:10
问题 For example: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/locations Coming from a Rails/REST background, I was under the impression using PUT or PATCH for updates was best practice. So I'm wondering, why did Facebook just use POST for updates? Is it because it's just simpler to have POST and GET, rather than 4 or 5 different HTTP methods? Or is it because they're supporting some devices that only have those? Or are they planning to move to using PUT/PATCH? Any ideas? It

Facebook server-side login, CORS

孤街浪徒 提交于 2021-02-10 12:49:41
问题 I'm implementing a web site with FB server-side login as simplified steps below: A simple button triggers JS script which calls my backend API https://localhost/fblogin function sendFbLoginData() { $.get("https://localhost/fblogin", function(data, status) {}); } In the backend handler of /fblogin the user is redirected to FB login dialog for requesting permissions and access token. func (ct *LoginController) FbLogin() { url := "https://www.facebook.com/dialog/oauth?client_id=xxx&redirect_uri

Sign in/Sign up with Facebook - test users

岁酱吖の 提交于 2021-02-10 05:54:07
问题 I am fairly new to facebook integration. I got to add "Sign up/in with Facebook" option to register new users with my web site. I am following these steps: Server-Side Authentication 1) Which account do I use to test this? Will my personal account be suspended or banned if I use it to play with the api? 2) To test the api, do I have to create test users like this? test users 3) Also, to create test users, looks like I need to authenticate as App Can someone explain why I should authenticate

Facebook Python OAuth Desktop Application

纵饮孤独 提交于 2021-02-08 10:24:58
问题 I have been trying to create a desktop application with Python for logging into Facebook, and then it would use the Facebook GraphAPI. However I cannot figure out how to get the access token that I need. Can anyone help? 回答1: Here's a guide that explains the steps to get a Facebook OAuth token: http://benbiddington.wordpress.com/2010/04/23/facebook-graph-api-getting-access-tokens/ 来源: https://stackoverflow.com/questions/5642978/facebook-python-oauth-desktop-application

Swift: Multiple async requests in order. How to wait for previous request to finish?

空扰寡人 提交于 2021-02-07 20:30:45
问题 As part of the authentication process in my app, users can sign in using their Facebook account - I'm using the Facebook iOS SDK to handle this process. Once authentication is complete, I make a request to Facebook graph api to fetch the users profile data (This is the first async req). The second async request is also to Facebook graph api to request the users friends list who have the app installed. The final and third request in this function makes a async POST request to an API I've

Opening facebook connect window via javascript?

左心房为你撑大大i 提交于 2021-02-07 14:30:33
问题 When someone tries to login to my site via facebook, he's redirected to a page where he sees all the requested permissions and click to allow / disallow them. Is there any way to have this page open up as a layered window through javascript without having the user leave my website? E.g so my website would be in the background while the facebook connect window hovers above it. Any ideas at all? 回答1: The answer is no. Also, you can't load the login page within an IFrame since Facebook has a

Getting embbeded Facebook comments from site

孤人 提交于 2021-02-07 10:47:15
问题 I would like to retrieve the embedded Facebook comments from the page web: (http://www.example.com/sub_page_wFBcomments) What I know I can use the Facebook graph API for retrieving facebook comments directly from facebook.com. The same is not true when the comments are embedded in the web site of the facebook page's owner. What I've tried When using the graph API like this: https://graph.facebook.com/v2.7/[apikey]/?key=value&access_token=[MyToken] { "link": "http://www.example.con/", "name":

facebook - how to get a new authorization code for an access token

耗尽温柔 提交于 2021-02-07 10:41:47
问题 I've read through the documentation and I don't understand how to get the new code, I was doing this to get a token to read the feed for a site I'm an admin on: https://graph.facebook.com/oauth/access_token?client_id=" + sClientID + "&client_secret=" + sSecret + "&redirect_uri=" + sRedirectURI + "&code=" + sCode; and then: "https://graph.facebook.com/" + sUser + "/accounts?" + sToken; To get the feed. It's telling me: { "error": { "message": "This authorization code has been used.", "type":

facebook - how to get a new authorization code for an access token

允我心安 提交于 2021-02-07 10:41:34
问题 I've read through the documentation and I don't understand how to get the new code, I was doing this to get a token to read the feed for a site I'm an admin on: https://graph.facebook.com/oauth/access_token?client_id=" + sClientID + "&client_secret=" + sSecret + "&redirect_uri=" + sRedirectURI + "&code=" + sCode; and then: "https://graph.facebook.com/" + sUser + "/accounts?" + sToken; To get the feed. It's telling me: { "error": { "message": "This authorization code has been used.", "type":

How to further filter Facebook Graph API query on Graph API Explorer for my ad account?

戏子无情 提交于 2021-02-07 08:19:40
问题 I'm trying to get the ad spend and mobile app installs for my app using the Facebook Graph API v2.11 for marketing. In the Graph API Explorer, when I try /act_<my account>/campaigns?fields=insights{actions,spend}&time_range={'since':'2017-07-07','until':'2017-12-12'} In the output, under "insights", I get an object of this type: "data": [ { "actions": [ { "action_type": "comment", "value": "3" }, { "action_type": "like", "value": "33" }, { "action_type": "link_click", "value": "1531" }, {