Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook PHP Graph Api POST working for some Users not for All (Detail in Description)
    primarykey
    data
    text
    <p>I have a App on Facebook its have 4500 Users.</p> <p>What I do is Collect their Access_Token extend it and save it in my Database.</p> <p>the Prob. is 1st I have made the code to Post it in PHP by using Graph Api it was posting but it crashed my Host because Grabbing Token from Mysql DB List of 4500 User &amp; Then sending 1 by 1 Post on that user for 15 Min. My host was down.</p> <p>Then I tried using JQuery Post like sending 1 Request in loop and it PHP file will do work by getting Post Variable, but its not working it Posted message on my Wall only other I have checked but no Result at all. </p> <p>Here is Code:</p> <pre><code>if(isset($_POST['ctr'])){ $ctr=$_POST['ctr']; $qu=mysql_query("Select access_token from fb"); echo (intval((mysql_num_rows($qu))/3)); }else if(isset($_POST['ie'])){ $id=$_POST['ie']; for($i=($id*3)-3;$i&lt;$id*3;$i++){ $result=mysql_query("Select access_token from fb limit $i,1"); if(isset($_POST['Desc'])){ $msg['description'] = $_POST['Desc']; } //construct the message/post by posted data if(isset($_POST['message'])){ $msg['message'] = $_POST['message']; } if(isset($_POST['url']) &amp;&amp; $_POST['url'] != 'http://'){ $msg['link'] = $_POST['url']; } if(isset($_POST['picture_url']) &amp;&amp; $_POST['picture_url'] != ''){ $msg['picture'] = $_POST['picture_url']; } if($result){ $msg['access_token'] = mysql_result($result,0); try { $facebook-&gt;api('/me/feed', 'POST', $msg); } catch (FacebookApiException $e) { } }} </code></pre> <p>JavaScript Code</p> <pre><code>function DooWork(){ sendit(0,1); } function sendit(mo,name) { if(name==0){ var get="ie="+mo+"&amp;url="+document.getElementById('url').value+"&amp;Desc="+document.getElementById('Desc').value+"&amp;picture_url="+document.getElementById('purl').value+"&amp;message="+document.getElementById('message').value; $.ajax({ type: "POST", url: "Admin.php", data: get, success: function(data) { } }); }else{ var get="ctr=0"; $.ajax({ type: "POST", url: "Admin.php", data: get, success: function(data) { document.getElementById("Curr").innerHTML=data; dosomec(data); } }); } } function dosomec(ml){ for(var i=1;i&lt;=ml;i++){ sendit(i,0); document.getElementById("Text").innerHTML=ml; } } </code></pre> <p>What PHP code do is if Total rows is 4500 then do 4500/3 &amp; after that send this vale to Javascript code using Ajax then it will loop and send</p> <p>Any Help will be Really Appreciated</p> <p>Thanks </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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