facebook-javascript-sdk

Facebook api friends list

杀马特。学长 韩版系。学妹 提交于 2019-12-11 08:27:48
问题 I'm using Facebook's javascript SDK to inspect the friends list of users registered in my application. I have this call: FB.getLoginStatus(function (response) { if (response.status == 'connected') { FB.api('me/friends', { fields: 'id, first_name, picture', limit: 6 },function(response){ MY CODE TO VIEW FRIENDS PICTURE }); } else{ CODE TO GET ACCESS_TOKEN } }); but in most of cases I get an api error like this: response.error = { message: unkown error, code: undefined, type: http, subcode:

Friends and Friendlists in Facebook

混江龙づ霸主 提交于 2019-12-11 08:09:15
问题 How do I find out if a friend is in for example the aquaintances or good friends or another custom friend_list with the JS SDK. Im working with a singlepage javascript application in phonegap. The main issue is that I need different sets of data, that aren't useable outside of the callback function. I tried to query all my friend lists like so, FB.api('me/friendlists'){ }); And all my friends like so FB.api('me/friends', function(friends){ friends.data.forEach(function(friend){ }); }); but

FB.logout() called without an access token. all.js:54

痞子三分冷 提交于 2019-12-11 07:58:19
问题 I load the facebook SDK like this: (function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; ref.parentNode.insertBefore(js, ref); }(document)); So, I get this error: FB.logout() called without an access token. all.js:54 How would I fix this? as its in the facebook SKD file?! 回答1: Try this code (function(d, s, id) { var

Wordpress loading wrong language for Facebook SDK

只愿长相守 提交于 2019-12-11 07:27:16
问题 We are trying to embed Facebook posts into Wordpress using the URL of the post. This works fine except for the language is wrong. Instead of the language appearing in English, it is appearing in Arabic. I believe I have traced the problem to the Facebook SDK that is loaded by Wordpress. This is the code that Facebook says to add to the page <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

Facebook Javascript fb.ui event to post photo on friends wall?

守給你的承諾、 提交于 2019-12-11 06:54:03
问题 I want to create a button, when clicked, should open a Facebook dialog requesting user to post a photo (I mean a photo. Not a attachment link) on their friends wall. Is that possible? Actually this might remove the possibility of asking permissions for publish_stream as user will have entire control over what to publish and what not.. 回答1: I'm almost sure it's not supported to post to another user's /photos connection - When you retrieve the post ID you get, are you sure it's not appearing in

FB.Event.Subscribe not working for some users

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 06:19:09
问题 FB.Event.subscribe('edge.create', function(response) { window.location.href="register_form.php"; }); This event is cached for few user account's only, not for everyone Has facebook made any changes in this regard..Please help 回答1: I also noticed problem with FB.even.subscribe but with the 'auth.login' not the 'edge.create'. more details: Auto login facebook - FB.Event.subscribe auth.login doesn't work I have to assume that there is a bug in facebook or change that done and made things go

Facebook manual logout

北战南征 提交于 2019-12-11 06:08:27
问题 I have .net web site which designed for working as standalone application. Due to one issue I was made to perform login flow to Facebook manually instead of calling FB.login(from FB javascript sdk). And because of this I am not able to call FB.logout (because in this case another issue appears). Facebook support advised me this: "In this case, you should manually clear the user's logged in session, by clearing any stored cookies, or removing any access tokens or user information stored on our

facebook follow and like api subscription event code (edge.create not working)

时光怂恿深爱的人放手 提交于 2019-12-11 05:46:58
问题 I've implemented liking a website url along with attaching the edge.create event to it. I implemented the follow button but did not get the edge.create to function when clicking to follow button. Also, I cannot figure out how to like a specific facebook page and as well get the edge.create event to subscribe. I have the following code for when a user performs a LIKE on our website (not the facebook page): This code works well window.fbAsyncInit = function() { FB.init({ appId : 'xxxxxx',

Facebook edge.create

痴心易碎 提交于 2019-12-11 05:36:39
问题 I have added the edge.create event and the event can be fired by the browser as well. But how can I check if the user has liked the page when they come back to the site? <div id="fb-root"></div> <script type="text/javascript"> <!-- window.fbAsyncInit = function() { FB.init({appId: 'YOUR_FACEBOOK_APP_ID', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('edge.create', function(href, widget) { // OK }); }; 回答1: You are going to want to take a look at the signed_request

Facebook Feed Dialog not showing Picture

杀马特。学长 韩版系。学妹 提交于 2019-12-11 05:23:48
问题 I'm using the feed dialog, and the picture that I'm trying to use isn't showing. The dialog comes up with the correct description and caption, but no picture. Here's my javascript: FB.ui( { method: 'feed', name: message, description: "...", caption: "...", link: "http://our_domain.com", picture: "https://picture_stored_on_aws" }, (response) -> window.close() ) However, it works when I use a picture stored elsewhere, like this sample from the Facebook dev site: 'http://fbrell.com/f8.jpg'. I