facebook-javascript-sdk

Facebook does not show thumbnail when a photo is shared

那年仲夏 提交于 2019-12-07 08:10:28
I am using the following code to share images on facebook but when the dialog box is shown it does not show the image and once it is uploaded facebook just shows a link to image. <a name="share" type="button" href="https://www.facebook.com/sharer.php?u=www.example.com/myimage" target="_blank">share</a> Facebook doesn't support sharing of plain images, only hyperlinks can be shared. Try posting the same image's link on your profile as status. Facebook won't show you any thumbnail for it but just the link. To share a image on facebook, you have to somehow upload it -_- This should work like this

Detect changes to the Facebook session

╄→尐↘猪︶ㄣ 提交于 2019-12-07 03:52:28
The look of my site depends heavily on whether the user is logged in via Facebook and resultantly, it is very important for me to detect any changes in the Facebook Session as soon as they occur in order for me to adapt the look of the page to reflect the users login status. I hate using intervals and timeouts for this sort of code as things can get really messy, but it appears to be the only option (to the best of my knowledge). I have tried using the FB.subscribe(auth.statusChange) , but this does not seem to fire regularly enough and necessarily correctly. Maybe I am using it wrong? The way

IOS Facebook SDK invite Missing App Link URL

﹥>﹥吖頭↗ 提交于 2019-12-07 03:37:24
问题 IOS Facebook SDK invite user message when i trying to invite anyone. Missing App Link URL The app link used with this invite does not contain an Android or IOS URL. Developers are required the enter a URL for at last one platform. 回答1: AppLinkUrl is not the url of your app in the market. You need to make your own appLinkUrl and put it in your info.plist(see: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html) that you'll be using for deepLinking.

Oauth 2.0 cannot get an access token from the signed_request 'code' value

孤街浪徒 提交于 2019-12-07 01:40:14
问题 I'm migrating to Oauth 2.0. My current site uses JS SDK, has a fb-login button, then I'm accessing Graph to get the users details. I'm having problems getting an access token to get this data from Graph. One problem could be that JS SDK dialog doesn't redirect my to the URL it says it should i.e. the one with ?code=XXXXXXX that I can then use to get an access token. So I've looked at the php SDK (I'm using ASP) to see how it does it. I've parsed the signed-request value in the cookie, got the

Facebook javascript sdk An active access token must be used to query information about the current user

匆匆过客 提交于 2019-12-07 00:16:42
问题 In my code I have FB.api('/me/friends', function(response) { if(response.data) { //TODO : what to do if no. of friends is more than 5000 (pagination by fb) friends_data=response.data; dijit.registry.byId("mainWidget_div").set_friends_data(friends_data); } else { alert("Error!"); } }); And this gives an error. But , if I call this function manually(on the console), there's no error FB.api('/me/friends', function(response){r=response;}); //wait a while r and now r.data is an array of my friends

Does Facebook provide a way to load debug JS?

限于喜欢 提交于 2019-12-06 23:01:38
问题 There are a number of references to using http://static.ak.fbcdn.net/connect/en_US/core.debug.js to facilitate javascript debugging (e.g. using Firebug) and I remember there was a recommendation in the developer docs some time ago about loading a debug version of the JS lib. The developer docs now only refer to the tool that allows you to submit some javascript on the form. When I try to have my code load http://static.ak.fbcdn.net/connect/en_US/core.debug.js , the function I assigned to

facebook javascript sdk login not working on iOS / best practices for mobile

戏子无情 提交于 2019-12-06 18:42:58
问题 I'm trying to allow a user to login to my webapp via facebook login using the javascript SDK. It works on desktop (safari and chrome), however the pop up fails on both safari and chrome on iOS. The error is straight forward to chrome where the browser and OS are not supported. This issue has a work around described here. It is less clear what the issue is with safari and not seeing the pop up. The login call is called on a button click so I don't believe the browser should block it. I also

Facebook Javascript SDK Security. How do Facebook verify that the JS SDK is loaded in the right domain that specified in the app settings

本小妞迷上赌 提交于 2019-12-06 16:21:49
There are few questions with same name but none of them intended to ask what I have in my mind. So we initialize FB js sdk with only app id. It's easy to know other web site's app id by looking at their facebook initialization source code. One might think that it's possible that a hacker might try to initialize FB JS SDK with other's app id and try to get their user access tokens. But facebook doesn't allow such stuff. You have to load js sdk from the same domain you specified in the site url property in Facebook Developer Apps page. So the question is how do they know that the jsonp whatever

ckeck if user like Facebook page or not without request Access Token

安稳与你 提交于 2019-12-06 14:50:10
问题 window.fbAsyncInit = function() { FB.init({ appId : '********', // App ID channelUrl : document.location.protocol + '//connect.facebook.net/en_US/all.js', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); var fql_query = "SELECT uid FROM page_fan WHERE page_id = "+page_id+"and uid="+user_id; FB.Data.query(fql_query).wait(function(rows) { if (rows.length == 1 && rows[0].uid == user_id)

How to get most liked, commented and shared posts from Facebook's API

北城余情 提交于 2019-12-06 14:33:52
问题 I'm trying to get some figures from Facebook telling me which posts have the most likes, comments and shares for a given Facebook page and within a given date range. I can get these figures if I query the API to get all the individual posts and loop through them in my own code, but I'm often getting an error from the API "600 calls per 600 seconds" rate limit error from them, because I'm making a call for each post. I've tried using FB's batch graph requests but this doesn't reduce the