Problem with social Plugin

Hello, I am new to corona and I am trying to use the social plugin. On the emulator I think it works fine because it shows up the warning message which is intialied in the social plugin. But when I try to run it on my phone. The app crashes.

here is my code:

  local fb= widget.newButton {defaultFile = "BG.png", onRelease= fbshare}         fb.x=centerX-73         fb.y= centerY+139         fb.width = 45         fb.height=50        fb.alpha=0.01        sceneGroup:insert(fb)

           local function fbshare(event)         print("fbshare ")       audio.play(btn)       audio.pause(menuMusic)        --------------======================FACEBOOK INTEGRATION======================================= local serviceName = "facebook"  --supported values are "twitter", "facebook", or "sinaWeibo" local isAvailable = native.canShowPopup( "social", serviceName ) if ( isAvailable ) then     local listener = {}     function listener:popup( event )         print( "name: " .. event.name )         print( "type: " .. event.type )         print( "action: " .. tostring( event.action ) )         print( "limitReached: " .. tostring( event.limitReached ) )     end     native.showPopup( "social",     {         service = serviceName,         message = "Hi there! This is a test msg!.",         listener = listener,         image =          {             { filename="smoke.png", baseDir=system.ResourceDirectory },             { filename="smoke.png", baseDir=system.ResourceDirectory }         },         url =          {             "http://www.coronalabs.com",             "http://docs.coronalabs.com"         }     }) else     native.showAlert(         "Cannot send " .. serviceName .. " message.",         "Please setup your " .. serviceName .. " account or check your network connection.",         { "OK" } ) end --------------======================FACEBOOK INTEGRATION ENDSSSSSSSSSSSS=======================================

Please help me out. I need to complete this app asap.

Try running the examples from here:

Repository and index: http://github.com/roaminggamer/CoronaGeek/tree/master/Hangouts/SocialMedia 

Direct download: http://github.com/roaminggamer/CoronaGeek/raw/master/Hangouts/SocialMedia.zip

If the appropriate one works fine, then compare how I’ve coded it to yours and see if there is a difference in the:

  • coding
  • build.settings

@roamingggamer 

I fixed it by removing the images, but however it opens the typical default apps list from which we have to select an app to share on. I want it to open the fb app directly. How can I do that?

I’d choose the projects in this sub-folder to examine:

~/SocialMedia/CoronaResources/fromBlogPosts

This is a very tricky topic, but well covered by examples and blog posts:

(Tip: You should read the blogs weekly if you’re not already doing so.  Even if you don’t use all the info, you’ll know what was talked about so you can go back and find it when needed).

What EXACTLY (give me a list) are you trying to do with facebook.  i.e. What do you want to post?  Facebook is notoriously sucky. You can’t post pre-filled messages, etc. 

If you want to do pre-filling and advanced usage, you’ll need to use the facebook.* plugin (graph library) and that is a lot of work. i.e. I don’t suggest it.

I know all of this is kinda negative sounding, so if anyone wants to chime in feel free.   

Final note.  I no longer implement Facebook in my own apps.  I don’t see the purpose since we can’t pre-fill w/o using the graph library (This is the fault of FB not Corona.)

Try running the examples from here:

Repository and index: http://github.com/roaminggamer/CoronaGeek/tree/master/Hangouts/SocialMedia 

Direct download: http://github.com/roaminggamer/CoronaGeek/raw/master/Hangouts/SocialMedia.zip

If the appropriate one works fine, then compare how I’ve coded it to yours and see if there is a difference in the:

  • coding
  • build.settings

@roamingggamer 

I fixed it by removing the images, but however it opens the typical default apps list from which we have to select an app to share on. I want it to open the fb app directly. How can I do that?

I’d choose the projects in this sub-folder to examine:

~/SocialMedia/CoronaResources/fromBlogPosts

This is a very tricky topic, but well covered by examples and blog posts:

(Tip: You should read the blogs weekly if you’re not already doing so.  Even if you don’t use all the info, you’ll know what was talked about so you can go back and find it when needed).

What EXACTLY (give me a list) are you trying to do with facebook.  i.e. What do you want to post?  Facebook is notoriously sucky. You can’t post pre-filled messages, etc. 

If you want to do pre-filling and advanced usage, you’ll need to use the facebook.* plugin (graph library) and that is a lot of work. i.e. I don’t suggest it.

I know all of this is kinda negative sounding, so if anyone wants to chime in feel free.   

Final note.  I no longer implement Facebook in my own apps.  I don’t see the purpose since we can’t pre-fill w/o using the graph library (This is the fault of FB not Corona.)