M
M
Madion2014-06-04 07:09:32
PHP
Madion, 2014-06-04 07:09:32

Facebook API and posting a picture to a group?

Hello!
I'm trying to post a picture to a facebook group with the following code:

new FacebookRequest($session, 'POST', '/{group_id}/photos',
                array('message' =>'Текст',
                    'url' => 'http://site.ru/image.jpg'
                ));

The post is published, but for some reason the picture is displayed as an attached file, i.e. To see it, you must first click on the post. But when I manually add a picture in a group, the picture is displayed immediately in the post. What am I doing wrong?
3d47989de75e41feaea34a09bc9b6151.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fixmax1, 2014-06-06
@fixmax1

Try like this:

new FacebookRequest($session, 'POST', '/{group_id}/photos',
                array('message' =>'Текст http://site.ru/image.jpg',
                    'url' => 'http://site.ru'
                ));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question