Skip to content

Instantly share code, notes, and snippets.

@dgouldin
Created March 30, 2012 00:03
Show Gist options
  • Save dgouldin/2245093 to your computer and use it in GitHub Desktop.
Save dgouldin/2245093 to your computer and use it in GitHub Desktop.
<html>
<body>
<div id="fb-root"></div>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
var scopes = [
'email',
'user_birthday',
'user_likes',
'user_interests',
'friends_birthday',
'friends_interests',
'friends_likes',
'friends_location',
'friends_religion_politics',
];
FB.init({
appId: '...',
status: true,
channel: '...'
});
FB.getLoginStatus(function(response) {
console.log('getLoginStatus', response);
FB.login(function(response) {
console.log('login', response);
var title = 'Test',
link = 'http://www.google.com',
ids = ['...', '...'],
args = {
method: 'send',
name: title,
link: link,
to: ids
};
FB.ui(args, function() {
console.log('message', arguments);
});
}, {
scope: scopes.join(',')
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment