Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How to post on Facebook wall? — Gideros Forum

How to post on Facebook wall?

edited April 2013 in General questions
Hi,

I am trying to post on facebook wall using: www.facebook.com/sharer.php... but it only works on Gideros Desktop Player, on iOS simulator when I click facebook button nothing happened.

Is there any sample using iOS facebook SDK plugin? If I just want to open a feed dialog for user to share on their wall am I need implement iOS facebook plugin?

Please have a look at my steps (I only work with Facebook Javascript SDK before so I don't know if it is ok with iOS)
Facebook:setAppId(appId) -> request login
Facebook:authorize() -> no need to request "publish_stream" permission when use feed dialog right?
Facebook:getAccessToken()
Facebook:setAccessToken(accessToken)
if Facebook:isSessionValid() then
Facebook:dialog("feed", {app_id, redirect_uri, display, from, to, link, picture, source, name, caption, desc, properties, action, ref})
end

Comments

  • Ok I think the problem is that if I use URL, player must manually return to my games. If I use facebook SDK it appear as an in game pop-up, people can close it and continue to play.

    So I must dig into facebook SDK plugin now :)
  • ar2rsawseenar2rsawseen Maintainer
    Here is an example of using Facebook plugin:
    https://github.com/ar2rsawseen/GiderosFacebookAndroidPlugin/blob/master/GiderosFacebook/main.lua

    Basically what you are interested in is:
    require "facebook"
     
    facebook:addEventListener(Event.LOGIN_COMPLETE, function()
    	print("login successful")
    	facebook:extendAccessTokenIfNeeded()
    end)
     
    facebook:setAppId("352852401492555");
    facebook:authorize();
     
    facebook:dialog("feed", {
    	link = "<a href="http://giderosmobile.com"" rel="nofollow">http://giderosmobile.com"</a>, 
    	picture = "<a href="http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png"" rel="nofollow">http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png"</a>, 
    	name = "GiderosMobile.com", 
    	caption = "Awesome tool", 
    	description = "Check out this awesome product"
    })
Sign In or Register to comment.