Title: chaoste's Replies | WordPress.org

---

# chaoste

  [  ](https://wordpress.org/support/users/chaoste/)

 *   [Profile](https://wordpress.org/support/users/chaoste/)
 *   [Topics Started](https://wordpress.org/support/users/chaoste/topics/)
 *   [Replies Created](https://wordpress.org/support/users/chaoste/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/chaoste/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/chaoste/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/chaoste/engagements/)
 *   [Favorites](https://wordpress.org/support/users/chaoste/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [New Instagram API for OEmbed](https://wordpress.org/support/topic/new-instagram-api-for-oembed/)
 *  Thread Starter [chaoste](https://wordpress.org/support/users/chaoste/)
 * (@chaoste)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/new-instagram-api-for-oembed/#post-13595663)
 * Hi [@victorrest](https://wordpress.org/support/users/victorrest/),
 * In general, I’d suggest you to look out for a separate plugin with its own embed
   widgets (e.g. [https://wordpress.org/plugins/embedalbum-pro/](https://wordpress.org/plugins/embedalbum-pro/)).
 * If you really want to fix the endpoints (even though it will be removed completely
   this week), you might have a look into the new endpoints by Facebook for OEmbed:
   
   [https://developers.facebook.com/docs/plugins/oembed/](https://developers.facebook.com/docs/plugins/oembed/)
 * Example for FB posts:
 *     ```
       add_filter('oembed_providers', 'fr_replace_deprecated_fb_post_api', 10, 1);
       function fr_replace_deprecated_fb_post_api($providers) {
         unset($providers['#https?://www\.facebook\.com/.*/posts/.*#i']);
         $providers['#https?://www\.facebook\.com/.*/posts/.*#i'] = array('https://graph.facebook.com/v8.0/oembed_post', true);
         return $providers;
       }
       ```
   
 * The filter for acquiring the access token just needs to consider this API, too:
 *     ```
       add_filter('oembed_fetch_url', 'fr_add_facebook_access_token', 10, 3);
       function fr_add_facebook_access_token($provider, $url, $args) {
         if (strpos($provider, 'instagram_oembed') !== -1 || strpos($provider, 'oembed_post')) {
           $response = @file_get_contents(FR_FACEBOOK_TOKEN_URI);
           if (!$response) {
             trigger_error("Couldn't retrieve an access token for Facebooks OEmbed API. Check your App ID, Client Secret & the permissions in the Facebook Developer Dashboard.", E_USER_WARNING);
             return $provider;
           }
           $response = json_decode($response);
           $access_token = $response->access_token;
           $provider .= '&access_token=' . $access_token;
         }
         return $provider;
       }
       ```
   
 * [@joyously](https://wordpress.org/support/users/joyously/) Thanks for pointing
   out. Sadly, this means my work is useless :/
 * Greetings,
    Thomas
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Category Showcase for WooCommerce] ajax.gif is missing](https://wordpress.org/support/topic/ajax-gif-is-missing/)
 *  Thread Starter [chaoste](https://wordpress.org/support/users/chaoste/)
 * (@chaoste)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/ajax-gif-is-missing/#post-13539184)
 * Thanks for the quick response and carrying!
 * Thomas

Viewing 2 replies - 1 through 2 (of 2 total)