facebook-javascript-sdk

How to log out user from facebook application, but maintain login from facebook

邮差的信 提交于 2019-11-27 18:07:48
问题 I have tried the PHP SDK (v.3.1.1), and the current Javascript SDK as suggested here : https://developers.facebook.com/docs/guides/web/ now when trying to log out I have tried both FB.logout() ( for js ) and $facebook->getLogoutUrl() ; as the documentation for both clearly state, these methods log the user out of the application as well as their facebook session. But I only need to log the user out of the facebook application ( the test site ). I have tried logging the user out of my test

Facebook like and share button with callback

六月ゝ 毕业季﹏ 提交于 2019-11-27 17:53:46
I have a webpage where I have placed a Facebook like & share button and corresponding javascript callback functions are also present. Now the problem is, the javascript callback fires only when the user 'likes' and doesn't seem to fire when the 'share' button is pressed. Its like I need to award the user everytime he/she shares the link. Whereas with 'like', a user can only like a link once (not considering unlike/re-like). I know that the Share button is deprecated. But facebook now provides a share button with a like button. Source : https://developers.facebook.com/docs/plugins/like-button/

Implement Facebook API login with reactjs

强颜欢笑 提交于 2019-11-27 17:20:41
I'm working on using Facebook's Javascript SDK for authentication. I've been able to import the SDK properly and put a Like button on my page. But, the facebook login button has to be wrapped in the tag: <fb:login-button/> I currently have all of the code from the Facebook Login tutorial pasted into my index.html, the only html file in my project, which houses the React application. But, I need to put the last part, which has the actual login button, into my React component. When I tried to do that, I got the following error: ReactifyError: /Users/ritmatter/reps/js/components/Signup.jsx: Parse

How to add facebook share button on my website?

放肆的年华 提交于 2019-11-27 16:43:39
I have this code that suppose to work, but doesn't work. If this helps you in anyway that would be great. <script src='http://connect.facebook.net/en_US/all.js'></script> <p><a onclick='postToFeed(); return false;'><img src="images/fb.png" /></a></p> <p id='msg'></p> <script> FB.init({appId: "338334836292077", status: true, cookie: true}); function postToFeed() { // calling the API ... var obj = { method: 'feed', redirect_uri:'https://www.facebook.com/cryswashington?fref=ts', link:'https://developers.facebook.com/docs/reference/dialogs/', picture: 'http://fbrell.com/f8.jpg', name: 'Facebook

“Uncaught (in promise) undefined” error when using with=location in Facebook Graph API query

你。 提交于 2019-11-27 15:46:35
问题 I am currently developing a web application with the Facebook Graph API. My current goal is to retrieve only posts which have a location attached. While retrieving posts with and without location is already working, I am not able to retrieve only posts with location. The query which retrieves both types looks like this: '/me/feed?fields=id,name,message,picture,place,with_tags&limit=100&with=location' The query which should retrieve only posts with location looks like this: /me/feed?fields=id

The resource at “http://some-urls/some-files.js” was blocked because tracking protection is enabled

走远了吗. 提交于 2019-11-27 15:37:55
I got this error in javascript console while using the Facebook Login Api . The resource at "http://connect.facebook.net/en_US/sdk.js" was blocked because tracking protection is enabled. // Load the SDK asynchronously (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')); Google + plugin also blocked,Now my Facebook like and other social network plugins not work on Firefox 42.0 I used

Facebook Login API HTTPS Issue

十年热恋 提交于 2019-11-27 15:33:57
问题 The website I'm working on has a Facebook login option, but recently a user reported it wasn't working for them. I disabled my extensions etc, I got this error in my console: Blocked a frame with origin "https://www.facebook.com" from accessing a frame with origin "http://static.ak.facebook.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match. Is there an option I can feed to the API that will get it to work on

Codeigniter, Facebook javascript SDK, PHP SDK Redirect after facebook login doesn't getUser() until refresh

蓝咒 提交于 2019-11-27 15:15:02
问题 The process is as follows. 1. User clicks Facebook Login button 2. User signs in and grants perms 3. Facebook redirects uses FB.Event.subscribe auth.login to redirect my login controller 4. My login controller loads the fbconnect module and chains the method Connect() 5. Connect() Checks if there is a facebook user using getUser() and if true checks if they are an existing user to log them in or returns false if no facebook user was found. Everything works except the only problem is after

FB.getLoginStatus returns status unknown

寵の児 提交于 2019-11-27 14:21:21
When calling FB.getLoginStatus using a valid Facebook App the response status is always unknown. Exact response is {authResponse: undefined, status: "unknown"}. <html> <body> <div id="fb-root"></div> <script> window.fbAsyncInit = function(){ FB.init({ appId:'1484134468466778', status:true, cookie:true, xfbml:true}); FB.getLoginStatus(function(response){ console.log(response); }); }; (function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; d.getElementsByTagName(

OmniAuth Strategies Facebook NoAuthorizationCodeError (must pass either a `code` parameter or a signed request (via `signed_request` parameter):

社会主义新天地 提交于 2019-11-27 14:21:14
I am getting a error: OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either a `code` parameter or a signed request (via `signed_request` parameter or a `fbsr_XXX` cookie)): Its not coming all the time. Its coming once in a while, notified by airbrake. There are lot of links for this on google search but not able to find out a proper solution.. Anyone? omniauth.rb under initializers directory: OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], {:client_options =>