Need help, unable to import articles via Client #52
Comments
@simonengelhardt - Can you please look into this. |
@Faiyaz Sorry to hear that. I just looked into our logs and it seems you have since been able to import articles. Did you manage to resolve the issue? If not, could you show a little more of the code where you are calling this, so I can look into what may be causing this? Also, if you could please double check the app id and app secret you are passing in? If those look good, please check that the access token is a page access token with the necessary permissions as described in the Instant Articles API docs (you can use the access token debugger for this). |
Thanks for getting back. So I was unable to get this working, as I kept getting that error. So i switched to using RSS for the time being. As for my code, it is exactly the same as the one setup on quickstart.md $article = InstantArticle::create();
$transformer->transform($article, $someDocument);
// Instantiate an API client
$client = Client::create(
'{using our app-id}'
'{using our app secret}',
'{page access token}',
'{page id}',
false // development envirorment?
);
// Import the article
try {
$client->importArticle($article, $take_live);
} catch (Exception $e) {
echo 'Could not import the article: '.$e->getMessage();
} I have gotten the page access token via the graph api page. |
@Faiyaz I just sent you an email to get a little more information from you, so I can look into the cause. In the meantime, I'm glad you got up and running with RSS. I will comment back here when we have resolved the issue. |
Closing due to inactivity in the email dialogue. @Faiyaz feel free to send me the requested additional info per email and reopen if this issue still reproduces. |
I am getting this exception while trying to import articles - The following code is copied straight from the quickstart.md
The text was updated successfully, but these errors were encountered: