facebook-javascript-sdk

Unable to get a specific value on a JSON object

寵の児 提交于 2019-12-11 18:34:39
问题 I'm using the Facebook Javascript SDK to get inbox messages and so far I was able to get them and the transform it to a JSON object function getMsgs() { FB.api( "/me/inbox", function (response) { if (response && !response.error) { var result = JSON.stringify(response); document.getElementById("msgs").innerHTML="<pre>"+result+"</pre>"; } } ); } And what I end up getting is something like this: { "data":[ { "id":"15986833470221166", "to":{ "data":[ { "id":"7888047207869023", "name":"My Name" },

React Native FBSDK Version messed up for IOS and Android

故事扮演 提交于 2019-12-11 17:37:30
问题 I have an issue regarding FBSDK package version on IOS and Android. For Android, if I used the latest 0.6.0 version there is an error saying: What went wrong: Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/admin/Library/Android/sdk/build-tools/26.0.0/aapt'' finished with non-zero exit value 1 Now to sort this out I have to downgrade to 0.5.0 which works fine. However

using FB.data.query not getting any response back

最后都变了- 提交于 2019-12-11 17:09:16
问题 I am trying to get the user gender and birth date through the following: FB.api('/me', function(response) { var query = FB.Data.query('select birthday, gender from user where owner={0}', response.id); query.wait(function(rows) { console.log(rows[0].birthday); console.log(rows[0].gender); alert(rows[0].birthday); alert(rows[0].gender); }); }); However, I see nothing on the console and there is no alert. Why is this? 回答1: If you want the birthday and gender of an authenticated user (/me) you

JavaScript: Remove all members from an old Facebook Group in bulk

蓝咒 提交于 2019-12-11 16:14:56
问题 I am the admin of a several-years-old Facebook group that has since been overrun by scam accounts (700 or so of them). There are far too many members for me to, realistically, manually remove them - as Facebook recommends. Here is the link to the group: https://www.facebook.com/groups/101697209943412 I understand that many websites offer JavaScript to perform member removal in bulk; however, I also understand that most of these scripts are toxic and can give control of your page to their

Facebook webview fails when shared

假装没事ソ 提交于 2019-12-11 15:29:46
问题 FINAL EDIT This was a bug. After filing the report it was addressed. EDIT I am trying to get user id in a webview of my facebook messenger bot. It works fine on mobile, yet fails on desktop (web). This should not be the case. Messenger 2.1 release statement gives the following quote: Desktop support for Extensions SDK: This new feature will extend functionality across mobile and web, creating a consistent experience across devices. Now, features like user ID and sharing that used to only be

Getting userdata using Facebook Login Javascript SDK

无人久伴 提交于 2019-12-11 14:53:44
问题 I've used the Javascript SDK to use Facebook login, but now I'm connected, I don't know how to capture the user's data and send it on a codeigniter controller. I decided to use ajax, but I don't know how to implement it if I still don't have my facebook userdata. if (response.status === 'connected') { //How do I get userdata?? // I decided to use ajax $.ajax({ type : 'POST', data : 'userdata='+ //but I don't know how I would put my data, url : '<?php echo site_url("somecontroller/somefunction

Facebook login with Parse client site, use user object with Express js

不羁岁月 提交于 2019-12-11 12:13:22
问题 I am trying to create a login procedure with the Parse and Facebook Javascript SDK. The authentication works without a problem on the client side, but I need to access the user object (created by Parse SDK) on the server side too. How can I do this the most elegant way? I thought when I log in into Facebook via Parse a cookie is set and so I can access the user object from the server. Or should I do the login process server side? Any recommendations? 回答1: I'm facing the same problem. Turns

FB.ui puzzle: inconsistent error code 191… (seems like FB.init is frequently not working)

妖精的绣舞 提交于 2019-12-11 12:08:10
问题 I'm using FB.ui() like so: <script> window.fbAsyncInit = function() { FB.init({ appId : '##########', // App ID channelUrl : '//www.xxxxxxxxxx.com/channel.php', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); // Additional initialization code here }; // Load the SDK Asynchronously (function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d

Post YouTube video into a Facebook Event Wall

眉间皱痕 提交于 2019-12-11 11:40:25
问题 I try to post a YouTube video directly into a Facebook Event wall, using the Graph API. When posting to a FanPage wall I get a desired result (Post with preview picture and the video itself), But when posting to an event wall, I only get the message, without any video and preview picture. Here's the code: var eventObj = { source:'http://www.youtube.com/v/'+youTubeID, picture:'http://img.youtube.com/vi/'+youTubeID+'/0.jpg', message: messageText, name: eventName, caption: newDateArray[0] + ' '

Facebook channel URL for Cordova app

末鹿安然 提交于 2019-12-11 08:57:37
问题 I am working on a HTML5 mobile app, using cordova 2.6, and I am targetting iOS, Android BlackBerry and Windows Phone. I am trying to implement Facebook sharing feature using Facebook JavaScript SDK. I am trying to do it inside Corodova InAppBrowser My FB.init function is as following: FB.init({ appId : '0000000000', channelUrl : './js/libs/fb/channel.html', status : true }); I am having the error : Is there anything wrong with my Facebook app configuration, or my FB.init function? 回答1: If you