facebook-javascript-sdk

Facebook FB.ui send dialog intermittently returns invalid link error

岁酱吖の 提交于 2019-12-17 16:08:08
问题 This has been working fine for over a week. FB.ui({ method: 'send', to: connectionid, name: subject, picture: staticurl + 'images/logoformysite.png', link: homeurl + '/' + username + '/something=' + var1 +'&somethingelse=' + encodeURI(var2) + '&evenmore=' + encodeURI(var3), description: invitemessage, }); I had initially had an error last week where if the URL was within the Facebook domain, Facebook would block it. I fixed that and now both the picture and the link do not belong to the

Facebook new javascript sdk- uploading photos with it!

心不动则不痛 提交于 2019-12-17 10:46:53
问题 I am trying to upload a photo to facebook album with this javaascript code. FB.api('/me/photos', 'post', { access_token: GetToken(), name: 'uploaded photo', source: '@http://example.com/example.jpg' }, function(response) { if (!response || response.error) { alert('Error occured ' + response.error.message); } else { alert('Post Id: ' + response.id); } }); Can someone help me with this code. This code is not returning anything. 回答1: Assuming you want to do this in pure JavaScript/JQuery - you

How to get access token from FB.login method in javascript SDK

只谈情不闲聊 提交于 2019-12-17 10:10:42
问题 I need to get the access token from FB.login method in Javascript SDK. My login code is FB.login(function(response) { if (response.session) { if (response.perms) { } else { // user is logged in, but did not grant any permissions alert("No Permission.."); } } else { // user is not logged in alert("Please login to facebook"); } }, {perms:'read_stream,publish_stream,offline_access'}); Is there any way to get access token? I am able to get the access token using PHP . 回答1: You can get access

Facebook JavaScript SDK over HTTPS loading non-secure items

荒凉一梦 提交于 2019-12-17 07:08:21
问题 I have a Facebook application that uses the Facebook Connect.js. I am running my application over HTTPS. All content on the site is delivered from https:// with the exception of some content that must be included within Facebook's Connect.js The problem is that I get warning messages saying that there are non-secure items within the page. I've checked what scripts are being loaded using Chrome's Developer Tools / Network tab to see what files are being loaded and from where. The only one I

Facebook page access token with “Reading Permission” only [duplicate]

痞子三分冷 提交于 2019-12-14 04:21:48
问题 This question already has an answer here : Get long term access token for Facebook page (1 answer) Closed 4 years ago . I want to show the one latest shared post of my Facebook page in a website (text description + date of posting). I'm using Javascript (client-side only, PHP is not allowed because the website is not hosted in an Apache server). For that I need an Access Token with Manage Pages permission (correct me if I'm wrong please). According to my researches, getting a token that doesn

login Facebook registerCallback not called

与世无争的帅哥 提交于 2019-12-14 03:43:24
问题 Here is my onCreate method: @Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.activity_social_login); init(); hideActiveSocialNetworks(); FacebookSdk.sdkInitialize(getApplicationContext()); CallbackManager callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(LoginResult loginResult) { // not called Log.d("fb_login

Facebook Open Graph Story Custom Actions Keep Getting Rejected - Advice Please?

孤人 提交于 2019-12-14 02:18:42
问题 Right, I know this is a question that has been asked over and over and over, but I have been researching, and reading Open Graph docs, and I am at a loss now. This is the 3rd time my app has been rejected, sigh. Here's the low down: We have a site that has an optional quizz that the user can take, should they wish to. It's fun and quirky, and arrives at a personality type as the end result. As part of a competition element for a certain campaign, the user can share this story and stand a

facebook multi-friend selector( javascript SDK), counting number of friends

丶灬走出姿态 提交于 2019-12-14 00:28:26
问题 Hi i just wanted to know, is there any way to know how many friends the user selects from the multi-friend selector generated by the following code. function InviteFriends(){ FB.ui({ method: 'apprequests', message: 'come on man checkout my application.'}); } thanks 回答1: Yes, Facebook will send back the request_ids for all the requests sent. so the number of requests would equal the number of friends selected. How to access the request_ids is described in this tutorial: How To: Send An

When using the “like” social plugin, can I get the like message to display in the same way as the object preview in the Open Graph dashboard?

孤者浪人 提交于 2019-12-13 18:10:38
问题 I have a music app that I developed using HTML5's canvas. As different songs are selected, I have jquery that dynamically updates the URL in the browser to point to the correct song. I also have jquery that updates fb:like element. By using the debugging tool, I'm able to cache the pages (since my server is able to return correct meta-data for each URL provided). When I do this and like something on my website, I end up with a message saying "Sami liked a page." with some info underneath.

How to use the access token?

南笙酒味 提交于 2019-12-13 18:03:21
问题 How to use the access token after I get it with javascript ( response.authResponse.accessToken ) ? I want that everyone can send a message to a friend ( even after logged out from facebook ). EDIT: I have just tryed this code but it doesn't work: FB.api('/me?access_token=AAACZBLSe4fcoBAFcGMJZAUS9OthIr5o6ZCUySgXYj0nfWX7u08X7h0VZAFFuJJs9LmeWgud2u5ZCEZCeUHZCVIq1Y2j4gjKAjJ0gx5OY9PBihlABJn64njm', function(response) { }); function sendRequestto() { FB.ui({ method: 'send', name: 'hello', to: