Hi guys again heheheh
a try to integrate facebook on my app IOS
i using this example of
@ar2rsawseen require "facebook"
facebook:addEventListener(Event.LOGIN_COMPLETE, function()
print("login successful")
facebook:extendAccessTokenIfNeeded()
end)
facebook:setAppId("352852401492555");
facebook:authorize();
local text = TextField.new(nil, "post to wall")
text:setScale(3)
text:setPosition(10, 50)
stage:addChild(text)
text:addEventListener(Event.TOUCHES_BEGIN, function(e)
if text:hitTestPoint(e.touch.x, e.touch.y) and facebook:isSessionValid() then
facebook:dialog("feed", {
link = "
http://giderosmobile.com",
picture = "
http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png",
name = "GiderosMobile.com",
caption = "Awesome tool",
description = "Check out this awesome product"
})
end
end)
local text2 = TextField.new(nil, "Make api request")
text2:setScale(3)
text2:setPosition(10, 150)
stage:addChild(text2)
text2:addEventListener(Event.TOUCHES_BEGIN, function(e)
if text2:hitTestPoint(e.touch.x, e.touch.y) and facebook:isSessionValid() then
facebook:graphRequest("me")
end
end)
facebook:addEventListener(Event.REQUEST_COMPLETE, function(e)
print(e.response)
end)
facebook:addEventListener(Event.REQUEST_ERROR, function(e)
print(e.errorDescription)
end)
I export this to xcode and configure all like this video below, and the steps in manual reference of gideros
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/but when run this erro below happen...I need to add something more in xcode project or gideros project?
assets/main.lua:1: module 'facebook' not found:
no field package.preload['facebook']
no file './facebook.lua'
no file '/usr/local/share/lua/5.1/facebook.lua'
no file '/usr/local/share/lua/5.1/facebook/init.lua'
no file '/usr/local/lib/lua/5.1/facebook.lua'
no file '/usr/local/lib/lua/5.1/facebook/init.lua'
no file './facebook.so'
no file '/usr/local/lib/lua/5.1/facebook.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
/Users/pedronascimento/Documents/01-Projetos/xcode/Facebook/Facebook/assets/main.lua:1: in main chunk
Comments
You may have the same issue. Basically the Facebook SDK is not correctly setup in XCode so Gideros can't find it.
OK, I managed to figure out the issue. Although I had added the files in step 5 to my project, I had to also add them to the compile sources:
- add facebookbinder.cpp and gfacebook-ios.mm to the Build Phases > Compile Sources
If someone need i can upload xcode project of giderosplayer.
facebook:graphRequest("me/picture?redirect=false")
this return a url of my picture. How can i make this url a bitmap?
att
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
@pedroluis5
After I make the request
Because both of this methods print a gigantic string with weird characters and symbols.