Facebook like request returning stack trace

I’m attempting to add some small Facebook integration to my app using a Like button.

Here is the Facebook listener:

-- fb listener  
function fblistener( event )  
 if ( "session" == event.type ) then  
 if ( "login" == event.phase ) then  
 facebook.request( "180317462046314/likes", "POST" )  
 end  
 elseif ( "request" == event.type ) then  
 local response = event.response  
 print( response )  
 end  
end  

The request returns this stack trace when hooked up to ADB:
09-28 11:53:47.884: DEBUG/Facebook-Util(23293): POST URL: https://graph.facebook.com/180317462046314/likes
09-28 11:53:47.884: WARN/Bundle(23293): Key access_token expected byte[] but value was a java.lang.String. The default value was returned.
09-28 11:53:47.914: WARN/Bundle(23293): Attempt to cast generated internal exception:
09-28 11:53:47.914: WARN/Bundle(23293): java.lang.ClassCastException: java.lang.String
09-28 11:53:47.914: WARN/Bundle(23293): at android.os.Bundle.getByteArray(Bundle.java:1305)
09-28 11:53:47.914: WARN/Bundle(23293): at com.facebook.android.Util.openUrl(Util.java:155)
09-28 11:53:47.914: WARN/Bundle(23293): at com.facebook.android.Facebook.request(Facebook.java:559)
09-28 11:53:47.914: WARN/Bundle(23293): at com.facebook.android.AsyncFacebookRunner$2.run(AsyncFacebookRunner.java:253)
09-28 11:53:47.914: WARN/Bundle(23293): Key format expected byte[] but value was a java.lang.String. The default value was returned.
09-28 11:53:47.914: WARN/Bundle(23293): Attempt to cast generated internal exception:
09-28 11:53:47.914: WARN/Bundle(23293): java.lang.ClassCastException: java.lang.String
09-28 11:53:47.914: WARN/Bundle(23293): at android.os.Bundle.getByteArray(Bundle.java:1305)
09-28 11:53:47.914: WARN/Bundle(23293): at com.facebook.android.Util.openUrl(Util.java:155)
09-28 11:53:47.914: WARN/Bundle(23293): at com.facebook.android.Facebook.request(Facebook.java:559)
09-28 11:53:47.914: WARN/Bundle(23293): at com.facebook.android.AsyncFacebookRunner$2.run(AsyncFacebookRunner.java:253)
Any ideas? Am I not doing the like request correctly? I have check to see if a request of “me” works and it succeeds and returns JSON no problem so I know the Facebook connection is working.
[import]uid: 84258 topic_id: 15718 reply_id: 315718[/import]

Well, found out that stacktrace occurs even on successful post to my feed so that was definitely not the problem. What is the problem is that Facebook doesn’t support likes on apps/pages via the Graph API: http://bugs.developers.facebook.net/show_bug.cgi?id=10714#c7

So how are people implementing Like buttons in their apps? [import]uid: 84258 topic_id: 15718 reply_id: 58085[/import]

Have you managed to find out? [import]uid: 52103 topic_id: 15718 reply_id: 61467[/import]

You have to open an HTML file in a web popup that contains the Like button code. It’s a really crappy way and I’ve only gotten a few Likes in my app this way. Facebook really needs to allow Likes via their Graph API. [import]uid: 84258 topic_id: 15718 reply_id: 61476[/import]