SocialEngine 4: A Facebook Invite Box

First you need to go to https://developers.facebook.com and register for a new app.
then you take this simple script here:

<body>
<div id=”fb-root”></div>
<script src=”http://connect.facebook.net/en_US/all.js”></script>
<p>

<button type=”button” onclick=”sendRequestViaMultiFriendSelector(); return false;”>
<img src=”http://www.faceit-norge.com/application/modules/Inviter/externals/images/providers_big/facebook_logo.png” alt=”Facebook” />
<br />Facebook</button>
<script>
FB.init({
appId : ‘YOUR_APP_ID_HERE’,
frictionlessRequests: true
});

function sendRequestToRecipients() {
var user_ids = document.getElementsByName(“user_ids”)[0].value;
FB.ui({method: ‘apprequests’,
message: ‘My Great Request’,
to: user_ids
}, requestCallback);
}

function sendRequestViaMultiFriendSelector() {
FB.ui({method: ‘apprequests’,
message: ‘My Great Request’
}, requestCallback);
}

function requestCallback(response) {
// Handle callback here
}
</script>
and remember to edit the app id in the java section.

then you go to layout and then layout editor and add a new html block anywhere you would like the button and paste the code.
The result should be something like this:

This button will not work with invite only sites for now.

post-33585-13562544041074_thumb

Enjoy

Looking for quality SocialEngine Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , | Posted under 3rd Party Software, SocialEngine | RSS 2.0

Author Spotlight

Andrew Cross

Andrew Cross

Hi, I'm Andrew. A am a 25, ICT Administrator which offers support to company's around the South Wales Area. I have created a few social sites for myself and other company's. So far 2 out of 3 have been successful using the powerful SocialEngine Script. I continue to try and help the community of SocialEngine by giving Support and Technical Help where possible.

2 Comments on SocialEngine 4: A Facebook Invite Box

  1. Vikas says:

    Hello Andrew,
    I hope you are well!!!
    I just want to know that how to enable or add “Smiley” section into Social Engine Chat box Like Facebook ?
    Also currentlly i am using “Chat 4.7.0 ” module from social engine.
    Thank you.

    • Andrew Cross Andrew Cross says:

      Hello
      I am well thanks, the process of adding smilies to SE Chat looks to involes a lot of coding to the modual itself which could cause more of a server load as well, i will look into with more detail and if it is possible i will create a blog with instructions on how.

      FYI ArrowChat & CometChat have this function already and dont use as much server resources as SE Chat

Leave a Reply

Your email address will not be published. Required fields are marked *


× 8 = 56

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>