illegal charcters in facebook graph api

Posted by user1465888 on Stack Overflow See other posts from Stack Overflow or by user1465888
Published on 2012-06-19T09:08:12Z Indexed on 2012/06/19 9:16 UTC
Read the original article Hit count: 235

Filed under:
|
|
|

i was trying to get how many facebook likes an url got, through facebook graph api. to get the likes i need to get the content from this url: http://graph.facebook.com/?id=URL

for example, try to get into this url: "graph.facebook.com/?id=http://stackoverflow.com" you will see how many "shares" the url got. shares is the sum of shares and likes, so every thing was working good when i was trying to this.

the problem start when i use special charcters. when i using the "?" charcter everything work okey. but when i use "&" charcter the url cuts itself.

try this: "graph.facebook.com/?id=http://stackoverflow.com?p=blabla&a=fsdf" you can see in this page that the id actullay cut itself when it get to the "&" charcter and the page ends like this:

{
   "id": "http://stackoverflow.com?p=blabla"
}

sorry for my bad english...

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook