winform facebook app accept friend request
I am using facebook-c#-sdk to develop a winform FaceBook app, this app should be able to accept friend request and chat with people.
But I didn't find any samples on how to access friend_request in the facebook-c#-sdk.
Can someone help to point out how could I accept friend request?
And especially how can I get the notification first and then accept the request?
Extra information:
The API, [facebook-C#-SDK] is officially supported by Microsoft
http://developers.facebook.com/tools/third-party-sdks/
I already check out the following post but found no solution to my problem.
Accept or decline Friend Request using FB Graph API
If you like, you can chat with my bot during office hour, it works only if I manually accept your friend request.
http://www.facebook.com/ictbot.np
AFAIK, consistent with Igy's link, there is no way for an app to send, accept or refuse a friend request. This is one of many capabilities which Facebook presumably does not consider appropriate for apps.
See https://developers.facebook.com/docs/reference/fql/friend_request/ on reading friend requests using the API, including the considerable limits on doing so.
Thanks Jon Newman for pointing out the limitation of API.
Basically there is no way to do so with Facebook API.
But I do have a workaround, and this workaround only works for certain scenario:
"When you have full control of a facebook account"
In my case ,the app is used only by my Facebook account. I have full control of both, so I will set the notification on in account setting.
When a friend request is send to my facebook, the notification is also send to my gmail.
Then I can retrieve it from gmail, filter out html tag, then a link will appear, open that link in browser.
Done.
Miscellaneous:
1)To retrieve email in gmail:
http://imapx.codeplex.com/releases/view/98061
Basicly Program.ImapClient.Folders[0].Messages[#].HtmlBody.TextData will give you the html data.
2) If your url is wrong, you will be redirected to friend request list where you can accept request manually.
链接地址: http://www.djcxy.com/p/53356.html