How can I get someone's url throught user's ID on soundcloud ?
Soundcloud API has stopped working since 2017, so I have to do this way.
I have this ID :
591290625 => https://soundcloud.com/helennpham
What I am trying to get is something like this:
www.soundcloud.com/591290625 or maybe www.soundcloud.com/users/591290625
Related
I would like to download messages (conversation) from FB Page. It works but there is a problem with sender's (user's) IDs. I use FB Page token and call for example this request:
https://graph.facebook.com/105070176212618/conversations?fields=senders
When I try to get sender's ID, it's wrong - it doesn't exist. API returns something like this: 2065372153561988.
Can you help me, please? Do I need any extra permissions? Thank you.
I see that when creating an ad, I can define UTM Tags with the endpoint URL_Tags
=> https://developers.facebook.com/docs/marketing-api/reference/ad-creative/
But if I want to track the performance I am not able to get back the UTM
=> https://developers.facebook.com/docs/marketing-api/insights/parameters
I know that super-metrics are able to get the URL Tags... there is no reason that they can and not the US.
=> https://supermetrics.com/api/getFields?ds=FA&fieldType=dim
If I am reading well, facebook API insight is not able to get me the URL Tags. But is there a workaround? Maybe playing with Facebook ads create the function... a read after write method or something like that?
Try this,
1).The UTM tags + Facebook ads article explains clearly on Standardizing a UTM protocol
2). For more on Track, FB Ads refer this article
3). Get the UTM tags with Facebook Marketing API refer
from facebook_business.adobjects.adaccount import AdAccount
from facebook_business.adobjects.adcreative import AdCreative
from facebook_business.api import FacebookAdsApi
access_token = '<ACCESS_TOKEN>'
app_secret = '<APP_SECRET>'
app_id = '<APP_ID>'
id = '<ID>'
FacebookAdsApi.init(access_token=access_token)
fields = [
'name',
]
params = {
}
print AdAccount(id).get_ad_creatives(
fields=fields
)
Just replace your relevant details and add url_tags as a field under fields. You will be able to access all UTM params for every creative under your account.
So I am building a restaurant app and one of the features I want is to allow a user of the app to see photos from a particular restaurant's Instagram account.
And I want a user to be able to see this without having to login to their Instagram account, so they shouldn't even need an Instagram account for this to work.
So I have read this answer How can I get a user's media from Instagram without authenticating as a user?
And I tried what it said and used the client_id(which I recieved when I registered my app using my personal Instagram account), but I still get an error back saying :
{
meta: {
error_type: "OAuthAccessTokenException",
code: 400,
error_message: "The access_token provided is invalid."
}
}
The endpoint I am trying to hit is :
https://api.instagram.com/v1/users/search?q=[USERNAME]&client_id=[CLIENT ID]
So do I absolutely need an access token for this to work(and thus have to enforce a user to log in) ?
If I do, then is there way to generate an access token somehow without forcing the user log in?
I believe there is a way around this, as the popular dating app Tinder has this desired functionality I am looking for, as it allows you to see photos from people's Instagram account without having to log in! (I have just verified this 5 minutes ago!)
Any help on this would be much appreciated.
Thanks.
Edit April 2018: After facebook privacy case this endpoint is immediately put out of service. It seems we need to parse the JSON embedded in <script> tag directly within the profile page:
<script type="text/javascript">window._sharedData = {"activity_counts":...
Any better ideas are welcome.
You can use the most recent link
GET https://www.instagram.com/{username}/?__a=1
to get latest 20 posts in JSON format. Hope you put this to good use.
edit: other ways aren't valid anymore:
https://www.instagram.com/{username}/media/
Instagram used to allow most API requests with just client_id and without access_token, the apps registered back in the day still work with way, thats how some apps are able to show instagram photos without user login.
Instagram has changes the API specification, so new apps will have to get access_token, older apps will have to change before June 2016.
One way you can work around this is by using access_token generated by your account to access photos. Login locally and get access_token, use this for all API calls, it should not change, unless u change password,if it expires, regenerate and update in your server.
Since the endpoints don't exist anymore I switched to a PHP library -
https://github.com/pgrimaud/instagram-user-feed
Installed this lib with composer:
composer require pgrimaud/instagram-user-feed "^4.0"
To get a feed object -
$cache = new Instagram\Storage\CacheManager();
$api = new Instagram\Api($cache);
$api->setUserName('myvetbox');
$feed = $api->getFeed();
Example of how to use that object -
foreach ($feed->medias as $key => $value) {
echo '<li><img src="'.$value->thumbnailSrc.'"></li>';
}
I'm using Facebook Graph Api and FQL.
I would like to access to unseen facebook notifications. Is it possible ?
I have tried to do something like this :
"me/notifications". I can get "unseen_count" in the summary block but how can I have the id of each "unseen" notification in order to find them ?
I know the "unread" but not the "unseen"...
Thansk in advance ;-)
If you use FQL, you can easily get unread notifications:
Try running the following FQL query in your code or test it here:
SELECT app_id, body_html, body_text, href FROM notification WHERE is_unread = 1 AND recipient_id = me()
You will need to ask for the manage_notifications permission for the call to work.
I am trying to get facebook status and replies for those status, so what I didn't find anything other than Status messages: [a link] https://graph.facebook.com/367501354973 (A status message from Bret). Looks like this require userid but how can I get user id's of my friends. If I get my friends can I get the status of friends of my friends. I have been searching every possible place to find an answer on getting facebook status along with the replies but so for no luck. It would be great if there is a webcrawler for something like this.
Check this
http://developers.facebook.com/docs/reference/api/status/
You can also use below facebook Graph API Explorer tool to test
http://developers.facebook.com/tools/explorer/?method=GET&path=580490479
You can get your friend's ID by below
https://graph.facebook.com/me/friends?access_token=
You can get updated of Your friends by
https://graph.facebook.com/580490479/feed
and for Posting check below
http://developers.facebook.com/docs/reference/api/post/
--- Samir