Hi,
I am posting a link with an image of my google maps location. but would like the read more link to link to my app / web page. if i change the link in the main attachments code to my website the link seems to struggle finding the image to show in Facebook.
Other facebook requests seem to work ok, just when the actions part is added it doesn’t post.
its the first time I have tried it with this app.
Im on daily build 1182
My code is
function faceBookButton:touch(event) if event.phase == "began" then event.target.xScale = 1.5 event.target.yScale = 1.5 local facebook = require "facebook" local function listener( event ) if ( "session" == event.type ) then -- upon successful login, request list of friends of the signed in user if ( "login" == event.phase ) then local attachment = { name = "I'm out on a ride using CycleMate for iOS & Android", link = "http://maps.google.com/maps/api/staticmap?center=" .. currentLatitude .. "," .. currentLongitude .. "&zoom=16&markers=" .. currentLatitude .."," .. currentLongitude .. "&size=500x300&sensor=false", caption = "Current Distance: " .. string.format( '%.1f', distanceTravelled ), description = "CycleMate allows you to share your location & images by email / facebook / twitter. CycleMate also has a speedometer and mileometer. It is the all in one app for cyclists", picture = "http://maps.google.com/maps/api/staticmap?center=" .. currentLatitude .. "," .. currentLongitude .. "&zoom=16&markers=" .. currentLatitude .."," .. currentLongitude .. "&size=500x300&sensor=false" actions = json.encode( { { name = "Learn More", link = "http://www.gjmullen.co.uk" } } ) } facebook.request( "me/feed", "POST", attachment ) end end end -- NOTE: You must provide a valid application id provided from Facebook local appId = "xxxxxxxxxxxxxxx" if ( appId ) then facebook.login( appId, listener, {"publish\_stream"} ) else local function onComplete( event ) system.openURL( "http://developers.facebook.com/setup" ) end native.showAlert( "Error", "To develop for Facebook Connect, you need to get an application id from Facebook's website.", { "Learn More" }, onComplete ) end else event.target.xScale = 1 event.target.yScale = 1 end end