rewrite script to use wp_remote_get instead of ...

You can try this: foreach( $posts as $post ) { $url = sprintf( 'http://graph.facebook. com/?id=%s', get_permalink( $post->ID ) ); $response = wp_remote_get( $url, ...

Lee mas