You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting issues while I write this code:
rfb "github.com/huandu/facebook"
url := fmt.Sprintf("%s/feed?fields=id,from,message,created_time,updated_time,picture,likes&until=%d","xxxxxxx")
results, err := rfb.BatchApi("xxxxxxxxxx", rfb.Params{
"method": rfb.GET,
"relative_url": url,
})
if err != nil {
log.Println("Error on connecting: ", err)
}
This is the result body I use to get: results[0].Get("body")
Its working fine if the access_token is ok.
But I need the facebook error code while the access_token is wrong or user change his password or something else happen in facebook api.
In the above cases I got only error message like
"cannot format facebook batch response. json: cannot unmarshal object into Go value of type []facebook.Result" error.
It doesnt make sense to me what is actually causing the error and what is the error message, error code, type and subcode as well.
It causing because in session.go -> graphBatch function is always return []Result but when its having error then its only Result{} and throughing error from makeResult function decode(res)
It will very helpful to me if I can be able to get the facebook error(I mean the Error struct).
Please have a look on it.
The text was updated successfully, but these errors were encountered:
Getting issues while I write this code:
rfb "github.com/huandu/facebook"
url := fmt.Sprintf("%s/feed?fields=id,from,message,created_time,updated_time,picture,likes&until=%d","xxxxxxx")
results, err := rfb.BatchApi("xxxxxxxxxx", rfb.Params{
"method": rfb.GET,
"relative_url": url,
})
if err != nil {
log.Println("Error on connecting: ", err)
}
This is the result body I use to get: results[0].Get("body")
Its working fine if the access_token is ok.
But I need the facebook error code while the access_token is wrong or user change his password or something else happen in facebook api.
In the above cases I got only error message like
"cannot format facebook batch response. json: cannot unmarshal object into Go value of type []facebook.Result" error.
It doesnt make sense to me what is actually causing the error and what is the error message, error code, type and subcode as well.
It causing because in session.go -> graphBatch function is always return []Result but when its having error then its only Result{} and throughing error from makeResult function decode(res)
It will very helpful to me if I can be able to get the facebook error(I mean the Error struct).
Please have a look on it.
The text was updated successfully, but these errors were encountered: