Remo
Remo

Reputation: 389

Problem with Invite users through facebook?

I am trying to use Facebook to invite users for my ASP.NET website. Also, I want to give credit to the user who invited other users. I am using the following code to show the send button on my webpage. It is showing fine, but the problem is that the InviteID is hard-coded. I want to get the InviteID from code-behind so that I know who is inviting users. Is this possible? If it is, please show me how. Thanks a lot in advance!

<script type="text/javascript"
        src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>

<fb:send href="http://www.ebay.com/LearnMore.aspx?InviteID=12006"></fb:send>

Upvotes: 0

Views: 219

Answers (1)

Rufinus
Rufinus

Reputation: 30773

What you want is not possible with the fb:send widget. you need to use the new requests 2.0. see http://www.facebook.com/NeonFashion?sk=app_176086155780033 for an working example.

You need an app on facebook which is the target of the invite, from there you can readout the request and get the inviter and the invitee user id's. then you will have to delete the request and redirect the user to the target of your choice.

for a step to step guide see: http://af-design.com/blog/2011/02/17/using-facebook-requests-to-promote-a-website/ (language is PHP but its shouldnt be to hard to make the same in c#)

Upvotes: 1

Related Questions