Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7899671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:45:57+00:00 2026-06-03T08:45:57+00:00

Is it possible to create a web site and, with JavaScript, read the feed

  • 0

Is it possible to create a web site and, with JavaScript, read the feed from a Facebook page and display it to my sites visitor without them having to login, or even have Facebook for that matter.

I’m getting lost in the Facebook documentations 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:45:59+00:00Added an answer on June 3, 2026 at 8:45 am

    Thanks to @mch here commes version that uses php as a proxy to read a Facebook feed with JavaScript.

    Place a file called proxy.php on your server and add this code:

    <?php
    // always add this header to ensure the JSON is output in the correct format
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Cache-Control: no-cache");
    header("Pragma: no-cache");
    header('Content-Type: application/json; charset=utf-8'); 
    
    $graphUrl = $_POST[graphUrl];
    if ($graphUrl == "") {
        $graphUrl = "https://graph.facebook.com/facebook/feed/";
    }
    
    //App Info, needed for Auth
    $app_id = "1234567890";
    $app_secret = "0000011122234334445556aaass";
    
    //retrieve auth token
    $authToken = fetchUrl("https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={$app_id}&client_secret={$app_secret}");
    
    //Echo back json to read client side.
    echo fetchUrl("{$graphUrl}?{$authToken}");
    
    function fetchUrl($url){
        $ch = curl_init();
        curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, 20);
        $retData = curl_exec($ch);
        curl_close($ch); 
        return $retData;
    }
    ?>
    

    Change app_id, app_secret to your apps ids. Create apps here https://developers.facebook.com/apps/

    Create a HTML file next to your proxyfile. Add this code:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>FB reader</title>
    </head>
    <body>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
    
                var timeout = 5000,
                    load_error;
    
                load_error = function (jqXHR, textStatus, errorThrown) {
                    if (errorThrown === "timeout") {
                        alert('Server bussy');
                    } else {
                        alert('error: 404', textStatus + ": " + errorThrown);
                    }
                };      
    
                $(document).ready(function() {
                    console.log('Loading from Facebook...\n');
    
                    //Change data: {graphUrl: 'https://graph.facebook.com/iambounty/feed'},  to what ever you want.
                    $.ajax({
                        type: 'POST',
                        url: 'proxy.php',
                        data: {graphUrl: 'https://graph.facebook.com/iambounty/feed'}, 
                        timeout:  timeout,
                        error: load_error,
                        success: function (rv) {
                            var data = rv.data,
                                len = data.length,
                                i,
                                out = '';
                            for (i = 0; i < len; i += 1) {
                                if (data[i].description) {
                                    out += data[i].description + '\n\n';
                                }
                            }
                            console.log(out);
                        }
                    });
    
                });
            });
        </script>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to create a Javascript and include it in a web page
Is it possible to create a (yes/no) javascript messagebox from code-behind, and also retrieve
Is it possible to create a web app that, with the help of a
Is it possible to create a simple web browser for Android by using Monodroid?
Is it possible to create a WCF service (web service) that only accepts a
is it possible to create my own custom keys in the asp.net web.config file
Possible Duplicate: Create shortcut to console.log() In javascript we can easy assign functions to
I want to create a service that allows diverse web site owners to integrate
I want to know is it possible to reproduce obfuscated javascript code(create javascript code
I wish to create a mobile optimized web app by loading a website from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.