Skip to content

Instantly share code, notes, and snippets.

@AndrewRayCode
Last active December 27, 2015 17:39
Show Gist options
  • Save AndrewRayCode/7363352 to your computer and use it in GitHub Desktop.
Save AndrewRayCode/7363352 to your computer and use it in GitHub Desktop.
var good = 0,
bad = 0,
reqtime;
function post() {
reqtime = new Date().getTime();
$.when( $.post( 'https://graph.facebook.com/YOUR_APP_ID/accounts/test-users', {
locale: 'en_US',
access_token: 'YOUR_ACCESS_TOKEN',
installed: true,
permissions: 'read_stream,email,user_likes,user_interests',
name: 'Existing User'
}) ).then(function( a,b,c ) {
console.log('SUCCESS', ( new Date().getTime() - reqtime) + ' ms' );
good++;
}).fail(function( a,b,c ) {
console.log(
'FAIL',a,b,c, ( new Date().getTime() - reqtime) + ' ms. ' + good + '/' + bad + ' successes / fails (' +
((bad / (good + bad)) * 100) + '%)'
);
bad++;
}).always(function( a,b,c ) {
post();
});
}
post();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment