laravel-social-auto-posting
laravel-social-auto-posting copied to clipboard
Facebook: Graph returned an error: Unknown path components: /me/photos
larasap.php
<?php
return [
'facebook' => [
'app_id' => '***',
'app_secret' => '***',
'default_graph_version' => '3.0',
'page_access_token' => '***'
]
];
Code:
SendTo::Facebook(
'photo',
[
'photo' => 'image_path',
'message' => 'Test message'
]
);
It returns,
Graph returned an error: Unknown path components: /me/photos
What's the problem here?
@SagarNaliyapara What is image_path
. Basically, you should put your image file in public
folder and use public_path()
function. example:
SendTo::Facebook(
'photo',
[
'photo' => public_path('image.jpg'),
'message' => 'Laravel social auto posting'
]
);
@alihesari I've done the same but getting same error 😕
I sovled it by add v char into the version, 'default_graph_version' => '3.0', => 'default_graph_version' => 'v3.0',
https://gitmemory.com/issue/alihesari/laravel-social-auto-posting/8/471250106