Title: WP_Error in json_decode
Last modified: August 20, 2016

---

# WP_Error in json_decode

 *  [Fadi Chamoun](https://wordpress.org/support/users/faddoo/)
 * (@faddoo)
 * [14 years ago](https://wordpress.org/support/topic/wp_error-in-json_decode/)
 * Im trying to build a facebook login connector for my wordpress site, but the 
   json_decode seems not working. Anyone got an idea or know what this is?
 * Error:
    **Fatal error:** Cannot use object of type WP_Error as array in **\lib\
   core\facebook.php** on line **102**
 * Line 102:
    $user = json_decode( $data[‘body’] );
 * i tried with _json\_encode_ but still have the same problem.

The topic ‘WP_Error in json_decode’ is closed to new replies.

## Tags

 * [encode](https://wordpress.org/support/topic-tag/encode/)
 * [json](https://wordpress.org/support/topic-tag/json/)
 * [json_decode](https://wordpress.org/support/topic-tag/json_decode/)
 * [wp_error](https://wordpress.org/support/topic-tag/wp_error/)

 * 0 replies
 * 1 participant
 * Last reply from: [Fadi Chamoun](https://wordpress.org/support/users/faddoo/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/wp_error-in-json_decode/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
