Facebook plugin to share local image

Hi there, 

I am trying to implant the function for sharing the photos to facebook, using the Corona Demo for facebook.

the code is :

local photoData = {

                                photos = {

                                    { url = “https://coronalabs.com/wp-content/uploads/2014/11/Corona-Icon.png”, },

                                    { url = “https://www.coronalabs.com/links/demo/Corona90x90.png”, },

                                            },

                                }

            facebook.showDialog( “photo”,photoData)

and it is post successfully.

My question is : 

Is it possible to share the photo in the local path such as “system.DocumentsDirectory”?

and how is the param for the table?

thanks

Vincent

Please tell me, I read the documentation and some topics here, but got confused. What is the easiest way to share (advertise) a facebook game. A link or a screenshot or a pre-made picture is not important. Do I have to use the Facebook plugin for this, or can this be done using native.showPopup or Social Popup. And if for this you still need a plugin then use facebook.request or facebook.showDialog? The question may be very simple, I just do not use social networks even for personal purposes. All that is required is just to give the player the opportunity to talk about the game in facebook.

1 Like

@neo_freeman - currently, I just open a POST with default text and images. Then, they can add to it and post if they want. I have no successfully gotten any FB plugin (including the latest 4a) to use the newest FB functionality for connecting gamers with their friends. I’d be interested if anyone can get the latest FB API to be accessed by our Solar2D code, other than what the old FB 4a plugin supports.

2 Likes

Can you tell me how you do it? Can I work with facebook without a plugin?

1 Like

@neo_freeman - oh sorry, I am using the Facebook4a plugin to handle the post and login for me.

1 Like

To make a post on Facebook do I need a plugin? What actions with Facebook or another social network can I do without a plugin. An attempt to use the plugin resulted in the application stopping. My build.settings is like this

local myFacebookAppID = "111111111111111" --Here is my FB ID in quotation marks
settings =
{
	orientation =
	{
        default = "portrait",
        supported = { "portrait", },
	},
	android =
    {
        usesPermissions =
        {
            "android.permission.VIBRATE",
			"android.permission.INTERNET",
        },
    },
	{
        facebookAppId = myFacebookAppID,  
    },
	plugins =
    {
        ["plugin.facebook.v4a"] =
        {
            publisherId = "com.coronalabs"
        },
    },

I did so by declaring local facebook = require ("plugin.facebook.v4a") at the beginning of the game module (not main.lua). In the function scene: create called facebook.init (facebookListener). In the scene: show function, he created the “Share on FB” button and in his event handler called facebook.login (facebookListener, {"email", "user_birthday"}). Probably some of the steps is not true. I am trying to get a post to be published in a user account by clicking a button in the game. Something like, “Take a look at this cool game.”

1 Like

Hi Neo, I’m so frustrated with FB that I’m simply going to keep OS support for it, but no longer provide any direct access. For login, I’ll use Google or Apple, no longer FB. They keep inventing new policies that require more work. I have enough of that with Google and Apple.