Answer the question
In order to leave comments, you need to log in
How to upload a picture from a file on a computer using the facebook api?
The crux of the matter is as follows. We have a file on the hard drive C:\picture.png . How can I upload this picture to facebook using, for example, Graph API??? And I don't use facebook SDK. For example straight from the Grap API Explorer ???
For example, a picture from the Internet by URL is loaded without problems as follows:
POST graph.facebook.com
/me/photos?
url=https://appharbor.com/assets/images/stackoverflow-logo.png
&caption=Example%20caption
&access_token=<user_photos_token>
Answer the question
In order to leave comments, you need to log in
1. You can use curl from the command line. It is also available for Windows https://curl.haxx.se/download.html
curl \
-F "access_token=<user_photos_token>" \
-F "caption=This is an image file" \
-F '[email protected]\"C:\picture.png\"' \
"https://graph.facebook.com/v2.8/me/photos"
с помощью функции Curl , но что эта функция делает, я не знаю. Как обойтись без нее?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question