Profile picture URL using http://graph.facebook.com/{social network id}/picture?type=large not returning profile pic actual profile picture [duplicate] - facebook

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I have an issue now, suddenly all url image from facebook graph API in my database return a default image look likes this:
Example url :
http://graph.facebook.com/{user-id}/picture?type=large

It is a known bug (which could also mean that it will not be possible anymore in the future):
https://developers.facebook.com/bugs/2054375031451090/
You should subscribe to the bugs and wait.
Update: You can make it work by adding an access_token to the API call, but you should only do that server side, of course. An App Access Token should be good enough:
https://graph.facebook.com/<userId>/?fields=picture&type=large&access_token=...
Update 20.04.2018: It seems like picture URLs are working without an Access Token again: <img src="https://graph.facebook.com/[app-scoped-id]/picture" />

Please add access token parameter in the url
https://graph.facebook.com/id/picture?type=large&access_token=faskfjsld
This will work for sure.

There is an update here:
https://developers.facebook.com/bugs/2054375031451090/
I just tried and it works, by simply appending your access token to the URL link.
So this:
https://graph.facebook.com/<userId>/?fields=picture&type=large
Should become like this:
https://graph.facebook.com/<userId>/?fields=picture&type=large&access_token=...
Hope it helps!

Related

How do I set up a postgres connection on airflow for the postgres operator

For the rtfm crowd, let me document my suffering.
I went here:
https://betterdatascience.com/apache-airflow-postgres-database/
But my ui has UNAUTHORIZED in pink after I add the info.
I also went here:
https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/connections/postgres.html
But obvious questions remain. Which file? what is the format of the default data. Why can't I just make a connection string and put it somewhere.
I also read this, which doesn't tell us where to put this information, it only tells us how to programmatically override it. It did give me this golden nugget:
Which would have been another stack overflow question.
Is there a file I should type my connection information or connection string into that has examples already?
I solved it. There's no secret file like airflow.cfg. It's hidden away a database somewhere I set up long ago familiar to nobody who doesn't do this full time. To update or add connections, you either have to use the ui, which doesn't work for me, or you have to use the cli and type airflow connections add --conn-uri and the string we all know and love.
Since I wasn't born with the knowledge of all the commands available under the cli, I googled here:
https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html

How to create API with Dart?

I am currently creating a Flutter plugin, but I'm stuck in creating API.
This is an API that I want to create. (Java Example)
JAVA
PeterWorks.UserProperties userProperties = new PeterWorks.UserProperties();
userProperties.setAttrs("user_nick", "peterPark")
.setAttrs("place","Seoul")
.setAttrs("height",180)
.setAttrs("married",false);
Can you give me a sample that how to create that API with Dart?
Thanks.
You should check the types of topics that are normally allowed here, as this is borderline and others my outright flag it. In general, you should be posting specific questions showing what you've actually tried and not "build it for me" questions.
That said, here is a link (no affiliation) I referenced a while ago that focuses on building a basic backend server using Dart. See the second example.

is the sandbox broken - 500 error [duplicate]

This question already has an answer here:
Got Http response code 500 when accessing https://api.sandbox.paypal.com/v1/payments/billing-plans/xxxxxxxxxxx
(1 answer)
Closed 6 years ago.
is the sandbox for Paypal broken ? I receive a 500 error.
https://www.sandbox.paypal.com/websc&cmd=_express-checkout&token=EC-78048295RW8002111
I wasnt sure if it needs cgi-bin in the url but that does not work either
https://www.sandbox.paypal.com/cgi-bin/websc&cmd=_express-checkout&token=EC-78048295RW8002111
It's from my prestashop plugin - which seems to be having issues in sandbox mode.
The docs seem to suggest that url should work:
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-singleItemPayment-curl-etc/
thanks for any help ;)
Have just received this response from the support team:
We are already aware of the issue. Our engineers are working on it for a quick resolution.
I will let you know once the issue will be resolved.
Thank you in advance for you collaboration.

Soundcloud custom player bug [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
Soundcloud fails to acknowledge their bug with the custom players. Many sites are being affected. Here's a link to my previous question
https://stackoverflow.com/questions/16993681/soundcloud-custom-player-skin-not-playing-next-tracks
I can confirm that the bug exists as well. I created an issue about it on their github page, and i have also emailed support. I've spent the last two days trying to see if i could solve it by modifying their code somehow, but i'm pretty sure the bug exists in the actual flash payload that is being delivered via their API, and not on the javascript end of things.
EDIT: ok, i came up with a temporary solution to circumvent soundcloud's bug.
In sc-player.js around line 209 you should see:
load: function(track) {
var url = track.uri;
if(player){
player.api_load(url);
}else{
// create a container for the flash engine (IE needs this to operate properly)
$('<div class="sc-player-engine-container"></div>').appendTo(document.body).html(flashHtml(url));
}
This is the call that injects the new track into the flash player using the api_load call. Problem is that is totally not working right now. so instead of using that api, we just destroy the existing audio engine and replace it with a new one like so:
load: function(track) {
var url = track.uri;
if(player){
// player.api_load(url);
$('.sc-player-engine-container').html(flashHtml(url));
}else{
// create a container for the flash engine (IE needs this to operate properly)
$('<div class="sc-player-engine-container"></div>').appendTo(document.body).html(flashHtml(url));
}
Now it will play tracks after the first track finishes, or when the user switches tracks. This is not optimal because we have to keep loading an extra resource from soundcloud, but soundcloud has left us i a stick situation, and i see no other viable solution at the moment.
Indeed, i noticed that custom player doesn't work properly since few days.
I've found a solution for webkit browsers who support html5 audio only :
you have to include scripts as following (copied from sources):
widget js api: https://w.soundcloud.com/player/api.js
soundcloud.player.api.js (grab from github soundclound custom player)
sc-player.js (grab from github soundclound custom player)
It should solve problems only on html5 audio supported browsers, but it still don't work with the flashplayer fallback. Firefox 21 Mac version doesn't support mp3 yet, and use flash for stream audio...
I'm waiting for an answer from soundcloud dev support about this point.
Cheers.
I was able to fix the problem in Safari and Chrome by following the Soundcloud Github page updates from jQuery 1.4.2 to 1.9.0. https://github.com/soundcloud/soundcloud-custom-player
I also had to replace $.browser.msie with navigator.userAgent.match(/msie [6]/i) as described here: Fancybox doesn't work with jQuery v1.9.0 [ f.browser is undefined / Cannot read property 'msie' ]
I contacted the Soundcloud developer who suggested it could be a Firefox/Flash issue. Updating Flash did nothing for me, and the problem initially occurred simultaneously in all browsers. I applied deweydb's workaround and everything works well.

ASP.NET MVC: how to parse url string to get RouteData [duplicate]

This question already has answers here:
How to get RouteData by URL?
(2 answers)
Closed 8 years ago.
Is there any way to get RouteData from a url string?
I have login form with returlUrl as query string parameter.
My routes are defined as : {languageCode}/{controller}/{action}
In action method LogIn(string returlUrl) the returlUrl is something like "en/home/contacts" etc.
I need to change languagePart a i dont want to use string.Replace, as routes may change in future.
Thank you.
So this is an old thread obviously, but for anyone else coming to this question via Google, I just wrote a blog post about a way to do this pretty easily. I actually came across this question on SO when I was attempting to find a way to do this myself but I didn't find one that I liked so I wrote my own.
Creating a RouteData Instance from a URL
This forums thread might be useful: http://forums.asp.net/t/1281667.aspx
This is the best option I can think of off the top of my head. Bascially, using RouteTable.Routes.GetRouteData and Mocking HttpContextBase based on your Url string.