I would extract that logic to a new subclass, in that class check if feeds is a bogus value, if it is, throw a new exception. Then in my controller i would check if a FacebookApiException was thrown, if I catch one, the in would redirect with a flash message to inform the user that something went wrong.
This is just a prototype but I would do something like this:
Thanks for the quick replay
I would extract that logic to a new subclass, in that class check if feeds is a bogus value
the script dont run up to retrieving the feeds it throwns an ex ....
I would extract that logic to a new subclass
sorry but I don't get your point ... Can you give me a simple example, please ?
Just more information
I'm building up a rest api
Oh, if thats a know exception and you are not catching it, chances are you are not using the namespace correctly. You may need something like.
// The namespace route to the exception.
use FacebookApi\FacebookApiException;
at the top of your file.
well catch (I've forgot it silly me) but it doesn't still work :(
What exactly are you seeing at the whoops screen when the exception is throw, can you paste the full code on a help.laravel.io for us? :D
mmmm http://stackoverflow.com/questions/10402939/facebook-php-sdk-throwing-an-uncatchable-oauthexception
FacebookApiException
Invalid OAuth access token signature.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community