A
A
Artem2018-05-11 13:20:54
JavaScript
Artem, 2018-05-11 13:20:54

Repost from a site to facebook do I need special permissions?

Good day, everyone. It is necessary to make it so that the user can repost to his facebook page, while a description and a picture should be added to the post, the function that performs this looks like this:

FB.ui({
                                  method: 'feed',
                                  link: 'https://site.ru',
                                  caption: 'test',
                                  description: 'Вы должны это видеть',
                                  picture: 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Moscow-City2015.jpg/405px-Moscow-City2015.jpg',

                               

                                }, function(response){
                                  console.log(response.post_id);
                                });

Everything is connected, a repost is made, only without a picture and without a description. who faced, tell me, please, do you need to check the application for these actions and have any permissions? Or is it more expedient to use another method?) It’s just that in VK it turned out to upload an image from the user’s computer and repost it on the wall, but here ... in general, I really hope for your help)))))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2018-05-11
@02pov57

I figured it out, I blunted it a little myself, if anyone is interested, when authorizing, it was necessary to specify the "scope" parameter:

FB.login(function(response) {
            if (response.authResponse) {
                  
   //ваш код
        }, {
            scope:'publish_actions',
            return_scopes: 'true'
        });

nevermind, maybe it will be useful to someone else)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question