javascript - Facebook invite users to an app's page -


i've got facebook app i've added facebook page. want allow user invite friends go page app on , interact app there.

i've can invite friends app this:

fb.ui({ method: 'apprequests',         message: '...'      }); 

but invite them page app on rather app itself.

i allow users send message friends instead using link like: https://www.facebook.com/dialog/send?app_id=... allow me include link facebook page, wondered if there better way of doing so?

in particular apprequests ui displays checkboxes friends. there way can use ui, promote page rather app?

there no official posibility invite friends directly page, since app unique can inserted in more 1 page.

what have check in context app been called. don't know if using php backend, server side code neccessary.

you have signed_request facebook sending you, , if there page in it. save context in session.

if familiar php, may you:

$signed_request = $fb->getsignedrequest();  if (isset($_request['signed_request'])){     $context = (isset($signed_request['page'])) ? 'tab' : 'app';     $_session['fb_context'] = $context; } else {     $context = isset($_session['fb_context']) ? $_session['fb_context'] : 'app'; } 

if find out in app context can redirect designated tab url.

if ($context == 'app') {     header('location: ...'); } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -