facebook-javascript-sdk

How to verify a users facebook id when making ajax posts to php in facebook app

穿精又带淫゛_ 提交于 2019-12-02 09:50:25
I am looking for a way to verify a users facebook id when posting user specific data using ajax. I want to be able to verify that a facebook user id is correct when posting data using ajax. The problem being, that if I post the facebook id as part of my ajax data, it can be edited in the javascript. I could make a graph call on the server side, but these are really slow, so I want to keep graph calls to a minimum. Preferably only calling it at the beginning. Can any suggest an efficient/secure method? In the end my solution was to grab the users facebook id via the php sdk and creating a hash

Facebook Javascript SDK: getLoginStatus getting no response

非 Y 不嫁゛ 提交于 2019-12-02 07:59:56
As instructed by this page , I include the SDK snippet into my page, except that since I don't have any Facebook APP and I was just trying to build a custom share button on my page, I leave parameter "app-id" as null . To test if it is up and running, on console I execute FB.getLoginStatus(function(response){ console.log(response) }) while I am logged in FB. However, it returns undefined , which means there is no response. What is wrong? Is this because I didn't assign a "app-id"? It depends on where you're calling getLoginStatus from and in what order. It needs to be inside your fbAsyncInit

Facebook iOS Mobile Web JS SDK Error

白昼怎懂夜的黑 提交于 2019-12-02 07:09:08
问题 We already have Facebook working on our main desktop app without an issue. When I added the same setup code to our mobile site I received an error from the JavaScript SDK: Received message of type object from https://s-static.ak.facebook.com, expected a string Then, I changed the setup code to an exact replica from here: https://developers.facebook.com/docs/guides/mobile/web/ and received the exact same message. This error only shows when the user-agent is iOS or Android in Chrome Developer

Finding mutual friends on facebook

∥☆過路亽.° 提交于 2019-12-02 06:04:51
问题 I want to find out mutual friends between two random users using the facebook Graph API v2.2. I read through the documentation https://developers.facebook.com/docs/graph-api/reference/v2.2/user.context/mutual_friends It says, "A valid user access token with user_friends permission is required to view the mutual friends of other friends using the app. " Is there a way that I can find number and possibly names of all mutual friends between currentUser and User2, if they are not friends with

why do else cases in fbAsyncinit/fb.Event.subscribe not work?

房东的猫 提交于 2019-12-02 06:02:25
问题 I'm wondering why it seems as though the "else if" case of response.status === 'not authorized' and the "else" case ("unknown", ie user is not logged into facebook) are not being executed. When I am logged into my app, testAPI() is called accordingly in the response.stats === 'connected' . However, when I open up incognito mode in Chrome, the testAPI() functions in the other else cases are not being called. Anyone know why? window.fbAsyncInit = function() { FB.init({ appId : 'appnumberhere',

Facebook Connect + jQuery Mobile + Phonegap Build

白昼怎懂夜的黑 提交于 2019-12-02 03:00:20
I'm trying to understand how to use Facebook Connect (login) with jQuery Mobile and Phonegap Build , but as more I search about this information, more I get confused. I have already my app created on Facebook, and I have API number. I don't know if the best way is to call a PHP page (via ajax) where validates EMAIL + PASS via Facebook PHP SDK or Facebook SDK Javascript. For SDK JS I don't understand how to integrate it in my code (and I don't know if it's possible to test it by localhost). If someone could help me with this question... Update I tried @Dom suggestion, but when I click in the

Finding mutual friends on facebook

别说谁变了你拦得住时间么 提交于 2019-12-02 01:11:27
I want to find out mutual friends between two random users using the facebook Graph API v2.2. I read through the documentation https://developers.facebook.com/docs/graph-api/reference/v2.2/user.context/mutual_friends It says, "A valid user access token with user_friends permission is required to view the mutual friends of other friends using the app. " Is there a way that I can find number and possibly names of all mutual friends between currentUser and User2, if they are not friends with each other? I referred to many other questions: Facebook Graph API 2.2 mutual friends => No answers How to

Unsafe JavaScript attempt to access a frame when using secure browsing on Facebook

我的梦境 提交于 2019-12-02 00:44:08
I've launched an application last week and have noticed since that in Chrome only the height of my canvas is not always adjusted. I've spent a bunch of hours looking at the issues and noticed that I get the following error - sometimes. Unsafe JavaScript attempt to access frame with URL https://apps.facebook.com/tabletr/ from frame with URL http://static.ak.facebook.com/connect/canvas_proxy.php?version=3#behavior=p&method=getPageInfo&params=%7B%22channelUrl%22%3A%22https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df3782154e%26origin%3Dhttps%253A%252F%252Ftabletr

Facebook Like Box social plugin doesn't work with Turbolinks

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 20:33:15
I'm using the Like Box social plugin ( https://developers.facebook.com/docs/reference/plugins/like-box/ ) and it works great. Problem is that I'm using it within a Rails 4 application with Turbolinks. Whenever I reload a page, the like box shows up. If I click on any link, the next page loads and the Like Box doesn't show up. I tried this already but didn't worked =/ http://reed.github.io/turbolinks-compatibility/facebook.html Any ideas on how to solve this problem? The link you have posted in original question is quite nice. It asks us to create three functions: 1) saveFacebookRoot: This is

FB.getLoginStatus suddenly stopped working on android browser

非 Y 不嫁゛ 提交于 2019-12-01 20:29:09
I used to use this code: FB.getLoginStatus(function(response) { .... } But all of a sudden its not working, The callback doesn't fire. Oddly though, only with the android native browser (tested 4.0, 4.1). It works on iPhone, iPad, Chrome & Safari, including Chrome for android. I can't figure out why but its not restricted to my app. For instance I this app built by Sencha is no longer working either (I used it to base my code off): http://www.sencha.com/apps/jog-with-friends actual app url (Sencha Jog with friends): http://j.mp/senchajwf I have gone through a lot of posts on this issue and