// get friends
FB.api('/me/friends', function(response) {
var result_holder = document.getElementById('result_friends');
var friend_data = response.data.sort(sortMethod);
$.ajax({
url: 'test.php',
data: friend_data,
type: 'POST',
dataType: 'json',
cache: false,
success: function(responseJSON) {
alert("HELLO");
});
.
.
.
. more stuff
0 Replies - 768 Views - Last Post: 18 March 2013 - 09:29 AM
#1
Facebook JS SDK with ajax wont let me send data to my server
Posted 18 March 2013 - 09:29 AM
I have no idea why this will not work. I want to retrieve a friendlist using facebook SDK and then send that data to my server. I can access and get the response from facebook and display all the friends with no problem. But when I try to send that information to a php page, the program just doesnt work anymore, it will not even show the friends. The code below is just the top of my program, when I enter the ajax part the whole program dies, but when it is not there it works perfect.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote


|