facebook-javascript-sdk

How to implement login and logout with Facebook Login and ReactJS?

女生的网名这么多〃 提交于 2019-12-24 08:58:19
问题 I'm trying to use Facebook Login for users to log in and out of my web app using React and React-Router. I made a component which redirects a user on successful login, but I am not able to render the log out button on the new view. I am also new to React-Router so I'm not entirely sure if the problem is with my routes. Here's my code so far: login.js class Login extends React.Component{ constructor(props) { super(props); this.state = { loggedStatus: false, id : '' } } componentDidMount() {

LogIn with FaceBook API from PHP doens't work

ⅰ亾dé卋堺 提交于 2019-12-24 07:46:16
问题 I'm trying to make a LogIn or register with Facebook from my web but doesn't work, actually some weeks back that work but since the last week it doesn't change the status from the API in the father file (for give it that name) bucause I'm using MVC with PHP I declare ths script like this <script> window.fbAsyncInit = function() { FB.init({ appId : '300012410734892', cookie : true, xfbml : true, version : 'v3.0' }); FB.AppEvents.logPageView(); }; (function(d, s, id){ var js, fjs = d

Facebook Error 191 on canvas app using FB.ui() for the 'feed' dialog (worked before, stopped working last week)

我只是一个虾纸丫 提交于 2019-12-24 02:56:28
问题 I'm having a sudden problem with FB.ui() for showing a feed dialog for a user to post content from my canvas app onto their facebook feed. This was working up until about a week ago, and we haven't deployed any new code to this. FB.ui({ "method":"feed", "name":"Your Horoscope for Today", "link":"http://apps.facebook.com/dhbdayscopetest/", "app_id":"213524052014025", "picture":"http://iota.tarot.com/fb/bday/images/signs/capricorn.png", "caption":"Capricorn", "description":"The time for

FB.UIServer._loadedNodes[a.frame] is undefined

ぃ、小莉子 提交于 2019-12-24 02:16:40
问题 I'm currently working with the JavaScript SDK for Facebook. The application was based on the apprequest sending and everything worked great. After a migration of the server, when I tried to do the apprequest again, the requests died and the console threw me this error: FB.UIServer._loadedNodes[a.frame] is undefined Does anyone know how to fix this? 回答1: Facebook knows how to funk up stuff! I just got an old all.js from my cache (dated yesterday ) and it works. So download this version, load

Sending msg and post on own wall function no longer work

久未见 提交于 2019-12-24 00:44:43
问题 I created social feeds functions(sending msg to friends and posting on own wall) using javascript SDK and graph API in Facebook 2-3 months ago for my apps. It was working perfectly when I created but now, when I visit my app and try to use them again, it no longer works. It's so strange since I never touched that code after I implemented them. I even tried to copy and pasting exact sample javascript code given in Facebook document and it didn't work either. Even after I re-write my code, it

FB.api error.. “An access token is required to request this resource”

大城市里の小女人 提交于 2019-12-24 00:37:45
问题 FB.api('/1354376857/groups', function(response){ Data = response.name; alert(Data); if (response.error) { alert(response.error.message); } }); The outputted error message reads: "An access token is required to request this resource" and Data content is undefined for my Facebook app. The user is successfully logged in and the "user_groups" permission has been approved by the user. I was under the impression that FB.api automatically sets the access token. Any thoughts on why this error is

Facebook Login JAvascript SDK, Content Securty Policy

妖精的绣舞 提交于 2019-12-24 00:37:30
问题 I've implement login with facebook (with javascript SDK method) in my website, it works perfectly if I disable my CSP (content security policy) but wont work if I enable it, below is my CSP code, can anyone enlighten me, what did I Miss? default-src 'none'; connect-src 'self'; frame-src https://www.facebook.com https://staticxx.facebook.com http://staticxx.facebook.com; img-src 'self' https://*.facebook.com https://scontent.xx.fbcdn.net; script-src 'self' https://code.jquery.com https:/

Multiple Facebook Shares on One Page

a 夏天 提交于 2019-12-23 20:06:08
问题 I have a daily deal aggregator site and i can't get the Facebook share to work properly. There are lots of deals on each page and each one has it's own FB share so they can post it on their wall, friends walls etc. here is the site so you can try the share: http://bit.ly/xFGzj5 Here is the code Im using now: <!-- Each Deal has this button that links to FB --> <a href="http://www.facebook.com/share.php?u=<?php echo urlencode($shareurl); ?>" onclick="return fbs_click('<?php echo urlencode(

FB.Event.subscribe('auth.login', function(response) { }) issue

做~自己de王妃 提交于 2019-12-23 17:27:51
问题 FB.Event.subscribe('auth.login', function(response) { FB.api('/me', function(response){ //Some operation });}); Above piece of JavaScript code runs when user logs-in through Facebook or when user is already logged-in the browser and you open the page containing the above JavaScript. Is there any way to execute the operation only when user logs-in for first time and escape the operation when user is already logged-in in the browser? 回答1: Run FB.getLoginStatus to see if the user is already

Facebook FB.logout not working in IE

跟風遠走 提交于 2019-12-23 17:11:02
问题 I am working on a django website which also allows users to sign in using their Facebook account. The login works fine, however I am not able to logout using Internet Explorer. The code seems to work fine on Firefox and Chrome. Heres the code function logoutFBUser() { //logout user from website and Facebook and reload alert ("called FB logout"); if (FB.getAuthResponse()) { alert ("has auth response"); FB.logout(function(response) { window.location.href = '/accounts/logout?next=/'; }); alert (