-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ciberch/invite
Invite
- Loading branch information
Showing
7 changed files
with
86 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
window.fbAsyncInit = function() { | ||
FB.init({ | ||
appId : app_id, // App ID | ||
channelUrl : '//friends.cloudfoundry.com/channel.html', // 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.getElementById(id)) {return;} | ||
js = d.createElement('script'); js.id = id; js.async = true; | ||
js.src = "//connect.facebook.net/en_US/all.js"; | ||
ref.parentNode.insertBefore(js, ref); | ||
}(document)); | ||
|
||
|
||
|
||
$(".Recommend").on("click",function(event){ | ||
console.log($(this).attr("uid")); | ||
var user_id = $(this).attr("uid"); | ||
console.log(user_id); | ||
FB.ui({method: 'apprequests', | ||
message: 'Find the right job here', | ||
to: user_id, | ||
}, requestCallback); | ||
}); | ||
|
||
|
||
function requestCallback(response) { | ||
// Handle callback here | ||
} | ||
|
||
$(".Recommend_to_friend").on("click",function(event){ | ||
FB.ui({ | ||
method: 'send', | ||
name: 'Check out this awesome job', | ||
link: $(this).attr("mylink") | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters