facebook-javascript-sdk

How to create requests dialog with multiple recipients selected by app

我们两清 提交于 2019-12-03 08:36:46
The Sims Social has their own friend selector. And once you select your friends and hit submit, it throws up this official Facebook request dialog that has multiple friends on it and a checkbox that says "Don't ask before sending The Sims Social requests to..." How can I duplicate this? I've tried sending an array to the apprequests ui dialog, but that gives "Error Message: Too many recipients." I'm not using the Facebook friend selector. I'm using my own and sending it to the apprequests dialog. The Sims does this, I just can't reproduce it. FB.ui({ method: 'apprequests', message: 'Send a

FB.login inside FB.getLoginStatus popup window blocked

戏子无情 提交于 2019-12-03 07:46:11
I'm trying to integrate Facebook login into my website with Facebook Javascript SDK. According to the step by step instructions provided by Facebook Developer document here , here is the test code I wrote: <script> window.fbAsyncInit = function() { FB.init({ appId : '{$MY_APP_ID}', cookie : true, // enable cookies to allow the server to access the session xfbml : true, // parse social plugins on this page version : 'v2.1', // use version 2.1 status : true, // check FB login status }); }; function fblogin() { FB.getLoginStatus(function(response) { if (response.status === 'connected') { alert(

Facebook login JS - FB.Event.subscribe('auth.login') triggers without login button click

早过忘川 提交于 2019-12-03 06:16:25
really need your help with log-in-with-facebook feature I'm trying to implement on my website. Basically, I'm trying to achieve the following: if user has acknowledged the app before and clicks FB Log in button on my website, they get logged into the website (with website's user account associated with the Facebook user ID) if user has not acknowledged the app before, on FB log in (and subscription to app) they get redirected to website's registration page. Here the form is pre-filled with user data coming through Facebook and registration process becomes easier and faster. I'm using the code

javascript - chrome violation : [Violation] Handler took 83ms of runtime

亡梦爱人 提交于 2019-12-03 06:15:23
问题 I'm trying to implement the Facebook's logout functionality in my project. Login works just fine. But i'm facing the getting the following message in JavaScript console with the logout code. [Violation] Long running JavaScript task took 318ms session.php:51 1 sdk.js:135 [Violation] Handler took 83ms of runtime (50ms allowed) I've tried to search for other similar threads and those solutions didn't work out for me. I tried removing parts of my code and see which part is giving problem. Its

What is the best way to track facebook comment widget in google analytics?

萝らか妹 提交于 2019-12-03 05:17:54
问题 I would like to apply event tracking in google analytics to facebook comments made on our website via the facebook social plugin (iframe widget), but I can't seem to find a way to attach the event. I would prefer if the solution was jquery based, but honostly I'm open to most any suggestion. 回答1: You can use the Facebook JS SDK Event Subscriptions, specifically comment.create event callback. FB.Event.subscribe('comment.create', function(response){ _gaq.push(["_trackEvent", "Facebook Comment",

Facebook Authentication Implementation

爷,独闯天下 提交于 2019-12-03 04:33:18
I'm working on a project which will use facebook authentication completely (no custom authentication implementation exists). Project uses PHP for server-side scripting. I looked around for implementing fast and secure authentication mechanism but i cannot find any detailed description about this subject. Facebook's documents are weak and does only provide basic information. Which authentication method would be appropriate? There's a Javascript SDK and PHP SDK. As i understand, i have to use Javascript SDK for login, then using PHP SDK i will check my database for verifying credentials. But

posting to friends wall using facebook javascript sdk

丶灬走出姿态 提交于 2019-12-03 02:26:59
How can I post to a friends wall using the facebook javascript SDK? John Himmelman In addition to @ifaour's answer on FB.api ... Set oauth and status parameters in FB.init Request extended permission, publish_stream, via FB.login Other resources: using facebook stream publish Complete example... <script> window.fbAsyncInit = function() { FB.init({ appId : 'APP_ID', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true , // parse XFBML oauth : true // Enable oauth authentication }); FB.login(function(response) { if (response

Using Facebook API to invite friends?

好久不见. 提交于 2019-12-03 01:58:42
问题 I want an "Invite Friends" link on my website where you click it and you get a Facebook dialog that asks you to choose which of your friends you'd like to invite. Those friends then either get an application request, Facebook email or at least a wall post inviting them to join my website. I'm a bit confused over what is the proper way to do this. It seems the only non-deprecated way now is through the Requests Dialog. So I call the FB.ui Javascript method like the example they give: FB.ui({

How do I use an FB.api(JS SDK) response outside of the callback function?

a 夏天 提交于 2019-12-03 01:32:22
问题 I am not having any issues with logging in or even calling the api, I just have an issue with getting the response outside of the api callback. I know that it runs asynchronously so I would like to put it in a function that would return the response. Here is my idea //What I would like to be able to do function fbUser(){ FB.api('/me', function(response){ //this logs the correct object console.log(response); }); //How do I get the response out here? return response; } I would like to call the

Facebook Auth Dialog: Developer warning concerning the use of “display” type “popup”

我的未来我决定 提交于 2019-12-03 01:17:37
starting today we receive developer warnings in the auth dialog with the following message: You are using a display type of 'popup' in a large browser window or tab. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, set height and width on your window.open() call to properly size this dialog if you have special requirements precluding you from using the SDK. This message is only visible to developers of your application. We have the following