Skip to content

Commit

Permalink
add the FB.ui sdk to allow posting on User's wall
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun Kalyanasundaram committed Nov 14, 2014
1 parent 558ea1d commit 7d595aa
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .finished-upgraders
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
local
.meteor
7 changes: 7 additions & 0 deletions .id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics

1la0pgrlvmor21rkc632
28 changes: 27 additions & 1 deletion client/FBClient.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
// All code here is client code


window.fbAsyncInit = function(){
FB.init({
appId : '287242084819085',
xfbml : true,
version : 'v2.1'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));


Accounts.ui.config({
requestPermissions: {
facebook: ['email', 'user_status'],
facebook: ['email', 'public_profile'],
}
});

Template.body.events({
"submit .new-task": function (event) {
FB.ui({
method: 'send',
link: 'http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html',
});

}
});

5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
</head>

<body>
<div id='fb-root'></div>
<h1>Grow your altruistic footprint on the web now!</h1>

<div>
{{> loginButtons}}
</div>

<form class="new-task">
<input type="submit" name="submit_task" value="Submit this task on FB" />
</form>
</body>
11 changes: 11 additions & 0 deletions packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-platform
autopublish
insecure
accounts-ui
accounts-facebook

0 comments on commit 7d595aa

Please sign in to comment.