facebook-javascript-sdk

How to make the new facebook post embed feature responsive?

只谈情不闲聊 提交于 2019-11-30 18:45:54
I couldn't find any solutions on google which can make the newly introduced facebook posts embed to responsive. Does anyone got a solution or tricks? Thanks <div id="fb-root"></div> <script>(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 = "http://connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-post" data-href="https://www.facebook.com/notes/facebook-security/national-cyber-security-awareness-month

Is channelUrl parameter for Facebook init() deprecated?

瘦欲@ 提交于 2019-11-30 18:39:25
I remember that there was a channelUrl option for FB.init() , but it seems that it does not exist anymore according to this page Is this feature deprecated? Yes, channelUrl is no longer required. Here's a quote from the blog post: Changed browser requirements for the JavaScript SDK In order for the JavaScript SDK to be able to communicate with Facebook, we now require either native support for HTML5 postMessage, or support for Flash, minimum version 8.0.24. As part of this change, we are no longer supporting the use of the channelUrl initialization option to provide a fallback mechanism.

Facebook javascript connect with localhost domain

邮差的信 提交于 2019-11-30 17:22:03
问题 I am trying to create facebook connect using javascript which gives follwing error: Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Does is due to I am using Localhost server for testing? Do I need to purchase domain to test this or what? Or do I need to make changes in following code: my code: <?php // //

SecurityError from Facebook and Cross Domain Messaging

坚强是说给别人听的谎言 提交于 2019-11-30 17:14:00
We have an application that utilizes the facebook javascript sdk and login capabilities. We've been noticing this error come up in our production logs. Specifically for iOS devices with versions 10.3 and higher. Also seems to only be targeting safari browsers SecurityError (DOM Exception 18): Blocked a frame with origin " https://www.mymadeupsite.com " from accessing a frame with origin " https://staticxx.facebook.com ". The frame being accessed set "document.domain" to "facebook.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access.

Why this Facebook javascript-sdk login code is automatically logging the user again and again?

末鹿安然 提交于 2019-11-30 16:42:44
Here I am unable to keep a user logged out once the user presses the logout button from my site. He is redirected to the login page but updateButton function is called again with same credentials he is getting logged in again. I tried several ways but the problem persists. I guess I am not doing things rightly in updateButton function down here and also FB.logout() is not being done correctly, as I get the error "FB.logout called without an access token" in the console. The code is as follows:- $(function(){ var button; window.fbAsyncInit = function(){ FB.init({ appId : 'myAppId', status :

FB.logout() called without an access token. javascript sdk

妖精的绣舞 提交于 2019-11-30 12:58:24
问题 Totally lost on this and docs don't really give any insight on this... Using the Facebook Javascript SDK in my app with this login button code: <fb:login-button scope="manage_pages,read_insights,ads_management" autologoutlink="true" size="large"></fb:login-button> As per the docs, autologoutlink=true param turns the login button to log out once the user is logged in. I want to keep this functionality and not write my own button code This event calls FB.logout but still returns the error

Cannot test FB.login to post without submitting app for review?

拜拜、爱过 提交于 2019-11-30 11:39:24
I'm building a share button that will (on the user's behalf) post some text and a link to my company facebook wall as part of a competition entry. I need to use the scope 'publish_actions' for this. However facebook won't let me ask for that until my App has been submitted for review. How am I supposed to do that when I don't even know if my code works yet!? I've tried creating a "test app" version of the app but it still has the same error: window.fbAsyncInit = function() { FB.init({ appId : 'xxxx', xfbml : false, version : 'v2.0' }); }; FB.login(function(response) { if (response.authResponse

FB is not defined javascript

这一生的挚爱 提交于 2019-11-30 11:25:18
I've a problem with FB JS SDK. I'm trying to do a request to get the fan_count of a facebook page node. Here is my code from my html file into the body : <script> window.fbAsyncInit = function() { FB.init({ appId : 'your-app-id', xfbml : true, version : 'v2.5' }); }; (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/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> And when I'm using this on my js app, I use it : init();

Facebook JavaScript SDK for FQL with additional parameter

可紊 提交于 2019-11-30 10:26:32
Facebook deprecated FB.Data.waitOn and FB.Data.query and they recommend we use FB.api instead. More info: http://developers.facebook.com/blog/post/561/ This sounds easy enough, but I can't seem to pass additional parameters with my FQL request without getting an error from Facebook. For example, I can successfully do this: FB.api({ method: 'fql.query', query: 'select page_id, name, pic, page_url from page where page_id=' + some_page_id }, function(response){ console.log(response); }); But I'd also like to pass the 'return_ssl_resources=1' additional parameter so that Facebook returns secure

Get Facebook fan page-id in page tab app using javascript

懵懂的女人 提交于 2019-11-30 06:07:18
问题 Can I get Facebook fan page-id in page tab app without authorizing user using javascript? And also if I authorized user and after that I get signed_request which only contains ["algorithm","code","issued_at","user_id"] not "page" object. How can I get "page" object? I want to add Page tab app similar to Pinterest Page App , which initially get UserId / UserName and after that if we open that app then it will directly open according to inserted UserId / UserName . 回答1: No, you can not. The