Facebook Like Botton?

how makes a facebook like botton ?
is something like that?

local facebook = require "facebook" -- listener for "fbconnect" eventslocal function listener( event ) if ( "session" == event.type ) then -- upon successful login, request list of friends if ( "login" == event.phase ) then facebook.request( "me/likes" ) end elseif ( "request" == event.type ) then -- event.response is a JSON object from the FB server local response = event.response print( response ) endend -- first argument is the app id that you get from Facebookfacebook.login( "1234567890", listener, {"publish_stream"} ) [/code] [import]uid: 23063 topic_id: 17004 reply_id: 317004[/import]

Have you tried the sample code that comes with the download of the coronaSDK?

Look for a SampleCode folder where you have the coronaSDK installed. Then look in the Networking folder. [import]uid: 67839 topic_id: 17004 reply_id: 63809[/import]

but I don’t know how it works
if the “me/likes” is right
or I need to use another way

did you know? [import]uid: 23063 topic_id: 17004 reply_id: 63811[/import]

I have tried to use facebook sample that corona give to us but I get an error:

“First Argument to facebook.login() should be a string”

what I need to do?

I have put my API KEY in “appID” [import]uid: 23063 topic_id: 17004 reply_id: 63815[/import]

Are you running on the simulator?

I think you have to build an app and install it on a device to test this code. [import]uid: 67839 topic_id: 17004 reply_id: 63836[/import]

Put " " around your appid in main.lua like:

local appId = “111222”

[import]uid: 67839 topic_id: 17004 reply_id: 63840[/import]

Hey… another think…

how can I get this app Id from a fan page?

for example I want do use this fan page: http://www.facebook.com/pages/Maori-Beach-Club/140307019359163

this fan’s pages have this app ID too? [import]uid: 23063 topic_id: 17004 reply_id: 64036[/import]

so, I get the fan page ID… but still not working… I’m getting an error in device when facebook pop ups:

{  
 "error": {  
 "message": "Error  
 validating application.",  
 "type": "OAuthException"  
 }  
}  

someone can help me? [import]uid: 23063 topic_id: 17004 reply_id: 64041[/import]

someone? [import]uid: 23063 topic_id: 17004 reply_id: 64309[/import]