Note that there are some explanatory texts on larger screens.

plurals
  1. POhaving an issue with invite friends dialog with facebook
    primarykey
    data
    text
    <p>i have a button with an if statement, and the idea is that when the button is pressed, the facebook multi friends invite dialog shows up.</p> <p>I did have it showing up when the main canvas loaded, but i needed it when the button was clicked, and now when i click the button it just refreshes the background.</p> <p>here is my statement:</p> <pre><code>&lt;?php if(isset($_POST['invite'])) { ?&gt; &lt;div id="fb-root"&gt;&lt;/div&gt;" &lt;script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt; &lt;script&gt; FB.init({ appId:'161051054059696', cookie:true, status:true, xfbml:true }); FB.ui({ method: 'apprequests', message: 'Share a geordie wall post with your mates!'}); &lt;/script&gt; &lt;?php } ?&gt; </code></pre> <p>instead of closing and opening the php tags i tried using echo but that wasn't very successful either. Personally i think my if statement looks like it should work, but obviously not.</p> <p>hopefully someone can help.</p> <p>my edited code:</p> <pre><code>&lt;div align="center"&gt; &lt;form method="post"&gt; &lt;input type="image" name="invite" src="images/invite.png" onClick="inviteFriend();"&gt; &lt;/form&gt; &lt;?php if(isset($_POST['invite'])) { ?&gt; &lt;div id="fb-root"&gt;&lt;/div&gt;" &lt;script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt; &lt;script&gt; FB.init({ appId:'161051054059696', cookie:true, status:true, xfbml:true }); function inviteFriend(){ FB.ui({ method: 'apprequests', message: 'Share a geordie wall post with your mates!'}); } &lt;/script&gt; &lt;?php } ?&gt; </code></pre> <p>i just realized that in my original code, i didn't include my button code. I have my own image to use as a button if that makes a difference.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload