Sending gift to facebook friend from external website
I tried to use XFBML:
<fb:serverfbml style="width: 755px;">
<script type="text/fbml">
<fb:fbml>
<fb:request-form action="http://example.com/user/handleFacebookGiftSend" method="POST" invite="false" type="gifts"
<fb:multi-friend-selector
....................
on a webpage on my website to send virtual gift (consisting of simply an image and a message) to selected friends on facebook.
But then it is sent as application request ( like request to add application) even thought the application is already added by the user to whom gift is being sent. In this case the application is not facebook canvas application but an external web application running outside of facebook.
This is not right way to send a virtual gift. Ideally this should be sent as a private message to user facebook inbox informing the user that he has a gift and to view the gift, click on the link given in the message. But this option is not available. Am I right about this?
Notification would be the next best option. Is this also not available?
If none of the above avail开发者_运维百科able, how do I send the virtual gift link to user without showing up as application request?
Help would be greatly appreciated as I spent considerable amount of time on this before posting here.
This might be used, if you extend a MultyFriendSelector you should send an URL specified with parameters in order that it you comes back to a definite direction depending on the parameters, you might use the return of call when the user does click in the request, this one would send you to the direction URL that you find ordered in the link of the button to confirm.
For example if you want to order a gift that would be a simple image you should define in the direction of return the location of the image in your server.
<fb:fbml>
<fb:request-form
action="index.php"
method="POST"
invite="false"
type="HalloweenMosters"
content="You have received a gift from HalloweenMosters. <?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/YOR APP/Gifts_Manager.php?key_api="YOUR AP ID&idGift=" "\" label=\"Send a gift\"") ?>">
<fb:multi-friend-selector
email_invite="false"
import_external_friends="false"
condensed='false'
actiontext="To donate an adorable Monster to a friend"
showborder="false" rows="3" cols="4"/>
</fb:request-form>
</fb:fbml>
I hope that sickle serves...
精彩评论