facebook-javascript-sdk

Like FB page doesn't fire edge.create event after confirming

不想你离开。 提交于 2019-11-28 07:48:47
问题 The following codes have worked before but not now. Since FB added the confirm box when liking a page, the edge.create was no more fired after confirming. <div class="fb-page" data-href="{{ $fbPageUrl }}" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"></div> <script> $(document).ready(function() { $.getScript('//connect.facebook.net/en_US/sdk.js', function(){ FB.init({ appId : 'xxxxxxxxxxxxxx', xfbml : true,

FB init function gives wrong version error

房东的猫 提交于 2019-11-28 06:42:32
I'm using the Facebook JS sdk, and I have created a new App today. Everything is configured properly. Using init function like: window.fbAsyncInit = function() { FB.init({ appId : 'xxxx', // App ID status : false, version: 'v2.0', cookie : true, xfbml : false // parse XFBML }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/pl_PL/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); but I have an error: "Uncaught Error: init not

how to get email id of Facebook user using javascript sdk

房东的猫 提交于 2019-11-28 04:55:20
I am using JavaScript API to create my app for Facebook. The problem is, it's returning email = undefined . I don't know why? And if I use Facebook login/logout button on my app then the alert shows correct email id of the user but I don't want to do that. What am I missing? Here is my code: <p><fb:login-button autologoutlink="true" perms="user_about_me,email"></fb:login-button></p> <script> window.fbAsyncInit = function () { FB.init({ appId: '250180631699888', status: true, cookie: true, xfbml: true }); FB.getLoginStatus(function (response) { if (response.session) { greet(); } }); };

Why isnt window.location.href= not forwarding to page using Safari?

我的梦境 提交于 2019-11-28 04:36:03
问题 My site lets users login via the Fb button, I'm using the FB / Parse.com JDK for this https://parse.com/docs/js/guide#users-facebook-users Once the user has been identified, the below code logs the user in and forwards them onto a url. This works as expected under Chrome, but will not work using Safari, the page just stays on the fb.html page which is blank I've seen that there were some historic issues with window.location.href= But, can't find a fix that works for my solution. Does anyone

Facebook sdk.js returns 404 error

孤街浪徒 提交于 2019-11-28 02:35:35
问题 My web-app has the Facebook JS SDK implemented. Yesterday, everything was working fine and without any modification on the code, the script request started to return 404 errors. When I try to access it directly, this is what I find: Facebook Status shows that the API everything is OK. Instagram's embeds.js and Facebook's debug SDK are also returning the same error: Does anyone knows what it happening? I've tried accessing these files using my 4G network and the same error is displayed. I'm

How to programatically create a Facebook application via JS SDK or Open Graph API? (createApplication)

此生再无相见时 提交于 2019-11-28 00:26:04
I know there are currently two methods that can be used to do this, documented (poorly) on Facebook's Developer site: The old (depreciated) JavaScript SDK FB.Connect.createApplication A new FBJS method Facebook.createApplication (only for use on Canvas pages) The problem is that I not using a Canvas app that runs FBJS, and I am not using the OLD JS SKD. I am trying to do this on a regular old PHP website that uses the current JavaScript SDK and the PHP SDK . I am doing the usual Open Graph API calls and such with the current SDK, so I understand the basics, I'm just not sure how to proceed to

Facebook FB.ui send dialog intermittently returns invalid link error

二次信任 提交于 2019-11-27 21:30:06
This has been working fine for over a week. FB.ui({ method: 'send', to: connectionid, name: subject, picture: staticurl + 'images/logoformysite.png', link: homeurl + '/' + username + '/something=' + var1 +'&somethingelse=' + encodeURI(var2) + '&evenmore=' + encodeURI(var3), description: invitemessage, }); I had initially had an error last week where if the URL was within the Facebook domain, Facebook would block it. I fixed that and now both the picture and the link do not belong to the Facebook domain and come from my site. But this started happening today with nothing changed. It is

Facebook JS SDK FB.logout() doesn't terminate user session

二次信任 提交于 2019-11-27 21:15:00
I'm attempting to log a user out of facebook with the Facebook JS SDK, however calling: FB.logout(function(response){ console.log(response); }); returns: response.status == "connected" And only after refreshing the page does the SDK realize that the session has ended. Anyone know what could be causing this behavior? This code previously worked in my application and has recently started behaving this way. Another example using FireBug: https://developers.facebook.com/bugs/245362365535898?browse=search_4f112135664703a96454690 This is a bug in the JS SDK that has now been fixed and it should get

Facebook Javascript SDK Problem: “FB is not defined”

*爱你&永不变心* 提交于 2019-11-27 20:50:55
问题 The following code, copied from the Facebook documentation here, is not working for me in Chrome. <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId : 'YOUR APP ID', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); </script> In the Javascript console I get: Uncaught ReferenceError: FB is not defined I'm not having any problems with the

Failed to render Facebook comments on Android WebView via local HTML

别说谁变了你拦得住时间么 提交于 2019-11-27 18:16:32
问题 I have a simple activity that create a WebView to load Facebook Comments, e.g. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView myWebView = (WebView) findViewById(R.id.webView); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); // myWebView.loadUrl("http://192.168.0.2/facebook.html"); // See 1st image myWebView.loadUrl("file:///android_asset/facebook.html"); // See