I'm having issues loading MY profile picture from a Flash App ON Facebook. It works fine locally, but when I upload to Facebook it loads this profile picture for ME ONLY (not my friends): http://profile.ak.fbcdn.net/
Here's what I'm doing:
Get the Facebook ID of my friends and me
Create a URL string: graph.facebook.com/[FACEBOOK ID]/picture?type=large for each of my friends and me.
Throw the URLs into loaders and load!
Facebook returns the actual address to each image: ie: http://profile.ak.fbcdn.net/hprofile-ak-snc4/370825_524761447_653077984_n.jpg
Throw the RETURNED address into another loader and then load the final, actual image.
Once this is done, the images are all loaded for all my friends, but for some reason, MY profile image always loads the generic one up at the beginning of the post (the profile.ak.fbcdn.net address without anything following...). It's this way for ANY user that's logged in. I've tested it on several profiles and had my friends test the app as well, they ALL get that generic picture as "their" picture ...
On a side note: The code worked fine before Christmas break in 2011 ... and when we came back to school in 2012 it didn't work any more, and we didn't change any of our code. I wonder if this is a Facebook API bug and not something we did.
Try this (put it somewhere when your app launches):
Security.loadPolicyFile("http://graph.facebook.com/crossdomain.xml");
Security.loadPolicyFile("http://profile.ak.fbcdn.net/crossdomain.xml");
Security.loadPolicyFile("https://graph.facebook.com/crossdomain.xml");
Security.loadPolicyFile("https://profile.ak.fbcdn.net/crossdomain.xml");
Security.allowDomain("*");
Security.allowInsecureDomain("*");
It could also have something to do with facebook changing security stuff. Every app needs to be run on a certified https server these days...
Related
there's only one similar question and it's not been answered. not for me at least.
There are public pages on Facebook, suppose i want to get their photostream ? their album pictures ?
I don't see how the Graph API allows me access since i can't get an access token, if i browse from my browser, NOT LOGGED IN, i can still see this public information, so how do i use the AI to access it.
BTW, i tried scrapping with python+mechanize and it's no go as if u get the regular we photo stream u get only partial, no all of it and the rest you need to scroll or to know how to build the same request the browser is building, but suprise suprise the JS doing the request is obfuscated pretty well...
Any help ?
in short it's not possible to do what i wanted annonymously, moreover at the moment, only some of the API works in the web site by accident only, if u are not logged in FB do not want to let u see any page and anyone, considering the last article about their cooperation with the US gov. it's not surprising.
In any case i just use grease money and FF to get a full page\album and then download the whole thing and i i need scrapping i'll do it on those pages with a script.
basically if i log in i can get a full page using the scripts in script monkey.... though script monkey is easier since he has the browser to parse all the data and works inside the browser...
I gave up after 3 weeks...
In trying to create an "object" page for my first facebook app, I've run into some difficulty. I followed Facebook's Open Graph Tutorial nearly exactly.
After creating an "object" html page with the appropriate <meta property="og:... tags I tried running the URL through the Debugger Tool as suggested in the tutorial but I'm given the following error:
"Facebook URLs aren't scrapable by this Debugger. Try your own."
This page is in the same directory on my company's linux box as the canvas page, and is certainly not a "Facebook URL". If it matters, I'm using an IP instead of a domain name: xx.x.x.xxx/app/obj.html
...
I continued the tutorial anyway, but ultimately it does not seem to want to post a new action/object (is this even right?). I did however manage to get something to work, as in the app timeline view I apparently actioned one of those objects a couple hours ago. I assume this happened when I was pasting curl POST commands into the terminal.
I'm pretty new to the whole open graph, and facebook APIs, etc., so I'm probably operating under false assumptions of some sort, and I've been all over trying different things, but this error seems pretty bizarre to me and I can't seem to resolve it.
UPDATE
I just took the object page and put it on my own personal shared hosting acct. The debugger worked (inexplicably) fine on it, but I couldn't go too far since it's a different domain than the one authorized by my app.
Make sure og:url inside your html page does not point to facebook.
Also, make sure to look at the open graph protocol page (to see you formatted the og tags correctly.
Also, make sure the page is accessible to everyone, not just yourself.
Without knowing the URL it's hard to be sure, but it's most likely that your URL is either including a og:url tag pointing to a facebook.com address, or a HTTP 301/302 redirect to Facebook instead
The new version of site is not ready yet.Thats why we use a subdomain.To make the link more user friendly we made the links to be like userName.site.com or at this point userName.dev.site.com instead of dev.site.com/userName
main url
dev.site.com
some example urls
jack.dev.site.com
stefan.dev.site.com
If i try to login in with facebook at this url dev.site.com , everything is ok. But when i go to jack.dev.site.com im not logged in anymore if i try to loggin, facebook returns an error.Then if i go to dev.site.com i'm actually logged.
I try with
document.domain = "dev.site.com";
with no effect. Any ideas ?
If I understand correctly you have 2 versions of your app, one is 'live' and one is 'beta'. Because these two versions reside in different sub-domains, you must create two apps on facebook. That is, the same app can't be hosted on two different subdomains.
I have created a new Facebook app. Whenever I visit the canvas page (https://apps.fac...) I get redirected to the Facebook 4oh4 page.
The canvas URL is set to: https://mgnewmedia.com/brandgame/
Which you will see is as basic as it could possibly be, yet I still get a 404.
I have used the debug tool, which does read it fine. I have checked the URL on other Internet connections and on other Facebook accounts, all 404. The app's canvas page is: https://apps.facebook.com/brandgame/
I have deleted the app and re-added it with no luck. I have also tried putting sample apps in place incase it's 404'ing due to no SDK being present, but that's not the case either.
I have a full, valid SSL certificate in place on the hosting, as you can see. I run several apps on here already with no such issues.
Full list of settings below:
App ID/API Key:
**
App secret:
**
App Namespace:
brandgame
Canvas Page:
https://apps.facebook.com/brandgame/
Canvas URL:
https://mgnewmedia.com/brandgame/
Secure Canvas URL:
https://mgnewmedia.com/brandgame/
Canvas FBML/iframe:
iframe
Contact Email:
**
Support Email Address:
**
App Description:
If you havent changed anything it will just be the delay in the setup as everything seems to be working fine here?
Can provide screenshot's if you want?
This was a bug with Facebook, it was listed on their Bug list tracker shortly after I posted this. It has not yet been resolved, but a work around has been posted. Essentially you add the app, rename it, then rename it back, waiting 20mins or so between each step.
It's worth noting that this doesn't affect everyone making apps, only certain accounts. I assume this is down to data centre allocation, or something such like.
I'm having this very unusual problem where on a page refresh all profile pictures that loaded on the previous page refresh no longer load. Instead each image laoded causes these errors in the console:
Resource interpreted as Image but transferred with MIME type text/javascript.
Failed to load resource: the server responded with a status of 400 (Bad Request)
Especially weirdly is, if I go on one page where I have say, 3 pictures A B and C. If on the next page I have 5, including A B and C from the last, only D and E will load. If I then refresh only A, B and C will load. This can be repeated forever!
Any ideas as to what on earth explains this?
PS. Not linking my app to start with as I don't believe it's necessary, but if needed I will do.
as loading profile pic via graph api is actually an in-direct way, problem will occur if facebook svr cannot handle your request (giving you the actualy pro file location).
I would suggest getting the static link to the user's profile pic via fql/graph api first and then use it in your app. This will actually boost up your app's performance too (displaying the profile pic via graph api is slow).
This is a temporary Facebook issue and has already been reported by at least two other users and logged with Facebook.
I've been seeing the same issue. And this is not the first time. My solution has been to cache the URL which the graph API redirects to. Never had problems with this URL (hosted on a pretty reliable CDN).
I've encountered this issue with alternating bad requests on profile pictures just now: at a closer inspection of the request header and answer headers, I've found the hint that Facebook doesn't allow P3P queries (not anymore? I thought it worked on my last app).
So, if you have somewhere a statement like
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
just remove it, and perhaps after clearing the browser cache and/or web framework cache, then it should work (if this was indeed the problem, and not coincidentally some Facebook bug).