pip install facebook-sdk
python
import facebook
API_KEY = 'YOUR_API_KEY'
graph = facebook.GraphAPI(access_token=API_KEY)
image_url = 'path_to_your_image_file.jpg'
image_data = open(image_url, 'rb')
result = graph.put_object(parent_object='me', connection_name='photos', source=image_data, message='')
for obj in result['tags']['data']:
print(obj['name'], ',', obj['confidence'])