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 3789096
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:06:07+00:00 2026-05-19T12:06:07+00:00

I am running this code : $.post(‘https://graph.facebook.com/me’,{}, function(msg){ console.log( Data Saved: + msg );

  • 0

I am running this code :

$.post('https://graph.facebook.com/me',{},
     function(msg){
     console.log( "Data Saved: " + msg );
    }
);  

and I am only getting Data Saved : as output in firebug nothig else is coming and call to the url is also not showing why ?

  • 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-05-19T12:06:08+00:00Added an answer on May 19, 2026 at 12:06 pm

    You can’t post to another domain (or protocol, or port). More specifically, you can but you can’t see the response that comes back for security reasons. This is part of the same origin policy browsers implement to keep your data from being posted/exploited on remote domains that aren’t the same as the page you went to.

    Picture for example I loaded http://www.yoursite.com and it tried to repeatedly post (as me remember) to https://www.mybank.com, using my stored cookies, etc…you see how you really wouldn’t want that to happen…that’s why it’s disallowed and the response you get back will be null instead of actually seeing the content.

    In this case you’re looking for one of their API calls using JSONP (callback=? on the URL in jQuery), which works by creating a <script> tag…an entirely different thing altogether. In your case you’re looking for something like this:

    $.getJSON('https://graph.facebook.com/me?callback=?', function(msg){
       console.log(msg);
    });
    

    Though, that’s not a valid API call by itself (e.g. you need an access token at least), you’ll need to use the method you’re actually looking for instead.


    Bit of a tangent, but since this is so misunderstood, let’s take another more popular example to illustrate the dangers if this was allowed. Think about all those services you stay logged into, Facebook, Twitter, etc. This is another facet of the same origin policy, not allowing your cookies, etc to be used is you do try and post…why is this? If my page could just post to Facebook or Twitter already logged in as you, man I could easily broadcast whatever message I wanted…you can see how this would be useful….and immediately used for evil as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a C++ extension for python using swig. I've followed the

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.