M
M
Maxim2016-10-14 10:22:33
Django
Maxim, 2016-10-14 10:22:33

How to upload multiple videos to facebook wall?

Hello everyone, I'm conquering facebook's non-conquerable api.
Is there a way to post multiple photos?

url = 'https://graph.facebook.com/me/feed?'
                data = {
                    'access_token': user.fb_token,
                    'message': message,
                }
                i = 0
                for id in media:
                    data.update({'attached_media[%d]' % (i): '{"media_fbid": "%s"}' % (id)})
                    i += 1
                resp = requests.post(url, data=data)

Everything clearly works, but only for photos, I need to combine the publication of photos, videos, etc.
url = 'https://graph-video.facebook.com/%s/videos?no_story=true' % (fb_user_id)
    data = dict(access_token=fb_token, file_url=file)
    response = requests.post(url, data)

This method uploads vidos to user videos and does not publish in the feed
But I can’t find a method that can post all this together in the feed

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2016-10-31
@zoonman

Remove the no_story=true option

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question