A Fuse Powered Company

Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

how to post a photo on feed? FACEBOOK
Started by Dhennrich Feb 11 2014 09:00 PM

No replies to this topic
facebook photo feed
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Dhennrich

[GLOBAL: userInfoPane.html]
Dhennrich
  • Pro
  • PipPipPipPipPipPip
  • 461 posts
  • Jedi

I'm trying to post a printScreen of my app to my own facebook's wall... I tried this but the app crash

 

 

native.setActivityIndicator(true);
  	local listener;
  	
  	listener = function(event)
	  	if ( "session" == event.type ) then
		  	if ( "login" == event.phase ) then
        		
        		local postMsg = {
          			message = "I just made" ..currentScore.. " pts in the Bee Flappy",
          			image = { {foto} },
          			--description = "descricao",
          			--link = "",
          			--name = "Bee Flappy",
          			--caption = "Bee Flappy"
        		};
        		
        		facebook.request( "me/feed", "POST", postMsg )
        		native.setActivityIndicator(true);
		  	end
	  	elseif ("request" == event.type) then	
			local respTab = json.decode(event.response);
      		native.setActivityIndicator(false);
   			
   			if respTab then
         		native.showAlert("Success", "Message successfuly posted!", {"OK"});
			end
		end
    	
    	native.setActivityIndicator(nil);
	end
  	facebook.login(appID, listener, {"publish_actions"});

 

where foto = display.captureScreen()

 

someone can help me?

 

Thanks




[topic_controls]
[/topic_controls]



Also tagged with one or more of these keywords: facebook, photo, feed