php - Getting previous statuses from $facebook->api('/me/feed') -


I am trying to use the previous status posted by the current user (which is logged in). It looks incredible and the number of returning positions may be different

I understand that you can use it? Limit =,? = And? Unless = until I use? Limit = 1000 thats enough to get something from the first posts created by the user that is unexpected.

Whatever I want to be able to do, it is using some situations before, since I have posted since joining Facebook. What would be the best way to do this? (Using '? Limit = 1000' takes a bit more!)

This sets permissions and then catches the feed:

  Requires 'php-sdk / src / facebook.php'; $ Facebook = New Facebook (array ('appId' =>; 'xxxxxxxx', 'secret' => 'xxxxxxxxxxxxxxxxxxxx', 'cookie' => true)); $ User = $ facebook-> GetUser (); // Permissions Required $ par = array (); $ Equal ['scope'] = "status_update user_out_out_man user_states"; $ Feed = null; $ Profile = null; $ LoginUrl = null; If ($ user) {$ logoutUrl = $ facebook- & gt; GetLogoutUrl (); Try {// Proceed and certify that you have a user who feeds $ feeds = $ facebook- & gt; The API ('/ mi / feed') is. // Get User Profile $ profile = $ facebook- & gt; API ('/ m'); } Hold (FacebookApiException $ e) {error_log ($ e); $ User = null; }} And {$ loginUrl = $ facebook-> gt; GetLoginUrl ($ equal); }? & Gt;   

This is what I am using to display status updates from the feed:

  foreach ($ feed ['data'] $ {//} If there is a message posted by the user: STATUS update = array_key_inists ('message', $ entry) and $ entry ['from'] ['name'] == $ profile ['name'] ; If ($ HitsStatsupdate) {$ likes = 0; $ Comment = 0; // Get the number of likes if (array_key_exists ('like', $ entry)) $ likes = count ($ entry ['likes']); // Get the number of comments if (array_key_exists ('comments', $ entry)) $ comments = count ($ entry ['comments']); // Exhibit message with likes and comments points echo & lt; Div class = "row" & gt; & Lt; Div class = "span4 column" & gt; & Lt; H2 & gt; Post '. $ Counter. ' & Lt; / H2 & gt; '; Echo '& lt; P & gt; like'. Choice $ & Lt; / Br & gt; '; Resonate 'Comment'. $ Comments & Lt; / P & gt; & Lt; / Div & gt; '; Echo '& lt; Div class = "span12 column" & gt; & Lt; H3 & gt; Substr ($ entry ['created_time'], 0, 10). '& Lt; / H3 & gt; '; Echo '& lt; Pre class = "prettyprint" & gt; $ Entry ['message']. '& Lt; / Pre & gt; & Lt; / Div & gt; '; }}    

You can not limit = 1000, and I'm not surprised that unexpected results Getting the upper limit on how many requests you can make at one time, even if it does not happen that you are more likely to have an out-of-date and only partial data.

What you can do but send a request that uses a 'after' field which is already in the past before it so that the user is certain before becoming a face member. For example, if you want to use from the date of 1/1/2000 then you will get a list of the given positions from the first.

Hope

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -