Send Gifts from the PHP Facebook App?

I need users to be able to send gifts to each other from my facebook application. I know how I'm going to store gift data in a database, but I'm not sure how the user can choose friends to send a gift.

First I tried this:

<fb:fbml>
<fb:request-form
  action="index.php" 
  method="POST" 
  invite="true" 
  type="YOUR APP NAME" 
  content="Your text goes here. <?php echo htmlentities("<fb:req-choice url=\"YOUR CANVAS URL\" label=\"Authorize My Application\"") ?>" > 
<fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use YOUR APP NAME."> 
</fb:request-form>
</fb:fbml>

And used:

$users = $_REQUEST['ids'];

to get a list of selected users on the POSTed page, but the code above also sends a request right away. I need to be able to create links based on the selected users, and then send a request.

Any help on this would be greatly appreciated!

+3
source share
2 answers

2 facebook.

</h2 >

facebook ( ). URL- , . URL url fb: req-choice.

Wallpost

facebook, api, - . publish_stream . - - URL- . ( , . zynga .)

JS api.

+4

, , , . , , , - . F.E. , FarmVille . , , , .

-1

Source: https://habr.com/ru/post/1773297/


All Articles