More feed and notification API implementations

Jun 9, 2007 at 11:44 AM
Please implement:
notifications.send
notifications.sendRequest

feed.publishStoryToUser
feed.publishActionOfUser

Note that when you implement the feed-related methods, you may receive authentication errors. I believe this is due to the fact that your authentication generation sorts based on key=value pairs instead of keys. Therefore, image1link=whatever will sort before image_1=whatever. Please correct this sorting behavior.

If for some reason you do not want to implement these methods, perhaps you could add something like the following so classes derived from FacebookService could implement them:

protected XmlDocument ExecuteApiCall(Dictionary<string, string> parameterDictionary)
{
if(!IsSessionActive() && IsDesktopApplication)
{
ConnectToFacebook();
}

return ExecuteApiCall(parameterDictionary, true);
}

Thanks for the good work!
Coordinator
Jun 11, 2007 at 2:21 AM
I will get these implemented and try out the sorting issue that you mention in the next day or 2. I will also add a protected method as you mention to open the door for subclasses.

Good idea. I will plan to get these remaining methods included with v1.1.
Coordinator
Jun 12, 2007 at 4:18 AM
I just added implemenations of these 4 api calls into version 1.1. I would like to officially release that version later this week. (I still need to finish the doc associated with that release)

Can you try out these methods and let me know how they work? I did some preliminary testing, but don't have a good working sample to test our these new functions. I did fix the parameter sorting that you mentioned. Nice catch.

Let me know how these implementations work.


Thanks.
Jun 12, 2007 at 4:02 PM
Hi There.

Just checkin out the latest source today and haven't had much luck with the SendRequest method. Do you have a sample method call with some parameters that i could see?

Plus you have a small bug with send the results back... just a space needs to get removed since its causing object not being set exception.

results = xmlDocument.GetElementsByTagName("notificationssendRequestresponse ")0.InnerText;

needs to be...

results = xmlDocument.GetElementsByTagName("notificationssendRequestresponse")0.InnerText;

Thanx
Coordinator
Jun 13, 2007 at 3:02 PM
Thanks. I fixed that problem in todays build. Let me know if that corrects your problem. And if not, what errors you are getting. Thanks.
Jun 15, 2007 at 12:33 PM
Thanks for the rapid implementation of these feed and notification methods. I tested them using build 5701 and they seem to work fine. For consistency with the Facebook API, you may want to rename them:

PublishStory -> PublishStoryToUser
PublishAction -> PublishActionOfUser
SendRequest -> SendRequestNotification (?)

Also, a little parameter intellisense, particularly for the key names (e.g., image1, image1_link) would probably be useful for most developers.

Thanks again. Have a good day.

P.S.,
I'm still not sure why the API user must "acknowledge" the SendRequest operation if sending to another user of the application. I guess this is a Facebook bug. I you happen to have any "direct" channels to the Facebook devs, perhaps you could ask them to fix this. See reference:

http://developers.facebook.com/documentation.php?v=1.0&method=notifications.sendRequest