How to connect to facebook and use the invite module, so that users can invite there frieds from my website. jQuery or Php or facebook markup?
In my website I have a invite option. Click and connect to Facebook for invite your friends, but they will be doing those in my website same page (ajax or iframe method for e开发者_如何学Pythonxample).
But I don't find yet any working example which works with jQuery or PHP. Can someone guide me with an working link, which really does exactly how I am trying to implement.
Tried this but seems not working for me with jQuery and PHP ex: http://connect.facebook.net/en_US/all.js
Well finally this is the answer, to make life easy and peasy, hope it help others:
Step 1: copy and paste the following code -> change the appId with your own facebook developer id.
<p><fb:login-button autologoutlink="true"></fb:login-button></p>
<!-- <p><fb:like></fb:like></p>-->
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {FB.init({appId: '133500<--put your-->developerid', status: true, cookie: true,xfbml: true});FB.Event.subscribe('auth.sessionChange', function(response) {if (response.session) {FB.ui({method: 'apprequests', title:'Invite your friends to my cool site!', message: 'You have been invited to this cool site'});} else {}}); };(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
Step 2: click the facebook icon, login, and invite others, with your own letter?
精彩评论