php - How to send app request to user all friends using Facebook request dialog? -
I was able to send an app request to a user of This app re-invites the first 50 friends for the users, again the next Invites users to 50 friends and so on In my code I can forward this url to users using PHP How can you proceed from here? You can follow it in the form: first 50 friends in you when you send a request, store the friend ID while saving the parameter and cookie. This redirects to your site URL, where you can repeat above step.ie. Send 50 requests to friends and stay in cookie. to = requesting 50 friends Am amend the field but I would like to send a request to all the users of this type like this app:
https://www.facebook.com/dialog/apprequests?app_id=443468799026324 and = ". $ Friend_ids." & Amp; Max_recipients = 50 & amp; Filter = app_non_users & amp; Redirect_uri = ". Urlencode ($ canvas_page2)." & Message = ". $ Message;
var to = ""; (Var J = 0; j & lt; 50 & amp; amp; j & Lt; friends.length; j ++) {if (friends [j] is checked == true) {to + = friends] .value; if (j! = Friends. Lambi -1 & amp; J! = 49) {to + = ',';}}} var redirect_uri = your_site_url + "? Button = inviteresponse "; Var callback =" "; (var i = j; i & lt; friends.length; i ++) {callbackto + = friends [i]. Value; if (i! = Friends. -1) {callbackto + = ',';}} Document.cookie = "param =" + callbackto + "; Path = "" var url = "https://www.facebook.com/dialog/apprequests?app_id=" + app_id + "& amp; To = "+ to +" & message = checkout app & amp; Redirect_uri = "+ redirect_uri; Window.open (url, '', 'width = 900, height = 500, resizable = yes, scrollbars = yes'); case" inviteresponse ": if (empty ($ _COOKIE ['param'] )) {Without set ($ _COOKIE ['param']); echo "& lt; Script type = 'text / javascript' & gt; Window.clause (); & Lt; / Script> "; die ();} and {$ friends = explosion (", ", $ _COOKIE [" param "]); $ from =" "; ($ J = 0; $ j <50 & Amp; amp; amp; amp; amp; $ j & lt; Count ($ Fellows); $ j ++) {$ S $ = Friends [$ j]; if ($ j! = Counting ($ buddies) - 1 & amp; ; $ J! = 49) {$ to. = ",";}} $ Redirect_uri = your_site_url + "? Button = invitation response "; $ callback =" "; ($ I = $ j; $ i & lt; count ($ friends); $ i ++) {$ callback. = $ Friends [$ i]; if ($ I! = Counting ($ friends) - 1) {$ callback. = ",";}} Unset ($ _COOKIE ['param']); setkey ("param", $ callback); $ url = "https: / /www.facebook.com/dialog/apprequests?app_id= "APP_ID" & Amp; To = "from $" and message = checkout app and redirect = url = ". $ Redirect_uri; header (" location: ". $ Url);}
Comments
Post a Comment