Facebook API - how to handle profile without a vanity url? - actionscript-3

I'm working on an AS3 Flash only facebook app - and I'm confused about how to download the users picture when a vanity url is not in use.
Once authorized - i'm able to access the basic information fine first_name, last_name (not profile pic tho).. but I do recieve the link which can come in 2 forms
1.with vanity url ie.
http://www.facebook.com/mynickname
2. without vanityurl ie.
http://www.facebook.com/profile.php?id=100000462568669
when 1. is in effect, I can access the remote profile picture fine via..
service.url = "http://graph.facebook.com/"+nickname+"?fields=picture";
but I don't know how to for case 2 - anyone seen this before?
Thanks

I believe the ID and vanity name are interchangeable.
http://graph.facebook.com/StevenLevy?fields=picture
is the same as
http://graph.facebook.com/534895623?fields=picture
Note: You may also be able to just use http://graph.facebook.com/534895623/picture if you're just looking for profile pictures.

After a question mark you have to use the ampersand (&) for other variables.
service.url = "http://graph.facebook.com/profile.php?id="+id+"&fields=picture";

Related

How do I show a specific web page to a specific user

Suppose I have made 2 static web pages and hosted them using virtual host. Let the names be example.com/page1.html and example.com/page2.html.
Now user A has his own unique browser with a unique USER_AGENT string. I have to make sure that when the user A tries to access example.com from his browser, he will be shown example.com/page2.html.
If anyone else tries to access the URL, they should be shown example.com/page1
Please someone help me out with this problem.
UPDATE 1
This can be done inculcating the USER_ACCESS string.
Dude you should use a backend programming language for that (PHP o JS with nodeJs) but in your case maybe you could ask a to the user a User and Password and baded on that rou could validate it using an if with Javascript and then redirect to website A or B or Not if user and/or Password are wrong.

Keyrock FIWARE method GET and POST

I have keyrock of fiware in my own laptop though docker.
When I do in my browser htp://localhost:8000 , this link redirect to a login website, so it's okay.
When I put htp://localhost:8000/sign_up this link redirect to a register website, so it's okay also.
But then thing is, If I want to do that though GET and POST, how can I do?
I installed Postman in my laptop but, when I put GET http://localhost:8000 everything is okay.
But when I put GET htp://localhost:8000/v3/users if I want list users, doesn't work.
the last I readed in this page : https://developer.openstack.org/api-ref/identity/v3/#users
Could you help me, please?
Thank you very much,
Best Regards.
As stated in the link you put in your question:
"A user with no assigned roles has no access to OpenStack resources."
The right port for your request is 5000 (keystone) instead of 8000 (horizon): http://localhost:5000/v3/users
So, to do what you want, you have to assign some specific role to the user you are using to access the list of users and, besides, I think you have to pass a valid token (X-Auth-Token header) in the request headers.
I hope it can help you.
I gave you a reply here that I think is a more detailed version of the same question. I hope this helps you. Otherwise, we can follow it in that question.
Best regards

Error: The requested URL “[no URL]”, is invalid

Originally posted as a reply to: Error: The requested URL "[no URL]", is invalid
I get this error but only with one specific website (which is my own). This must be linked to the website as it is happening on 3 different machines on 3 different networks (personal comp on personal wifi, phone on 4/3g and work pc on work network) and no other sites. Also, it happens no matter what you put after the domain name, weather its a real page or just '/sdjhlgajhsdfg'.
A reply to the other post said that it looks like somthing to do with akamai. As this is my site, i went to the CPanel and disabled the akamai options (over 24 hours ago). i do not need any kind of caching like this as it is a simple html css site with only a hand full of mostly text pages. The most complicated thing on the site is a downloadable pdf which i have actually just taken down.
The error ref number changes every time you refresh the page.
Reference #9.d7c33b8.1478565760.55ccef1
Reference #9.d7c33b8.1478566986.560a7c3
Reference #9.d7c33b8.1478567000.560b460
Any advice would be very much appreciated.
I finally found some time to contact my webserver provider.
I can see that the domain has been removed from the Akamai server.
However, the CNAME which was pointing to Akamai server was causing the
issue. I have removed the CNAME record.
after about half an hour its back up. theres some display issues with the layout, but at lease its displaying the relevant content and not the error.
When you see Invalid URL error, this indicates that the hostname (domain) is not recognized by the Akamai's network (production or staging).
More info at: https://control.akamai.com/search/kb/11327
Hope this helps.
If there is a reverse proxy in before akamai you may get this error.
Client > Reverse Proxy > Akamai > Your API, will give this error.
Let your reverse proxy strip "Host" header and sent by "Client" and try again.
That worked for me in a setup like this:
Browser > Caddy Server > Akamai > My API
in akamai i had to add a new property manager entry for the new url/cert then activate it in prod.

Itunes connect has changed to invalid binary

After i upload my application to app store after is done is show me in iphone application "has changed to invalid binary" and in the itunesconnect is show
http://i.stack.imgur.com/4vPJN.png
any solution ?
My experience:
There are many potential bug in your project.
1 .there may be private function(the third part SDK ,e.g. Reveal) in the project
2 .Missing Info.plist key - the app attempts to access privacy-sensitive data without a usage description.
Solve:
Generally,you will receive email from apple. I suggest you read it seriously.
It will tell you what should you do because they find out "invalid binary"...
Then solve the problem.

GetOwnedGames from SteamAPI Not Working?

I'm trying to get the hours of TF2 played from Steam profiles for an application I'm developing. I'm not very experienced at manipulating JSON, so I'm not sure if the API is bad or if I'm bad.
According to this: https://developer.valvesoftware.com/wiki/Steam_Web_API#GetOwnedGames_.28v0001.29 I can call include_played_free_games to show TF2. However when I make a web request using this: http://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?key=XXXXXXXXXXXXXXXXXXXXXXX&include_played_free_games=true&format=json&steamid=XXXXXXXXXXXXXXXXXXXXXXX
The request is valid, however TF2, appid 440, doesn't show up. So am I going crazy, or should this be working?
The user has to have played the game at some point for it to be returned when specifying 'include_played_free_games'.
From the API Documentation:
include_played_free_games: By default, free games like Team Fortress 2
are excluded (as technically everyone owns them). If
include_played_free_games is set, they will be returned if the player
has played them at some point. This is the same behavior as the games
list on the Steam Community.
The url requires a numeric value '1' for the parameters and will not work if you use 'true'. The following url worked for me when using my own steam id and web key:
http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=XXXXXXXXXXXXXXXX&include_played_free_games=1&include_appinfo=1&format=json&steamid=XXXXXXXXXXX