I've literally looked everywhere and cannot figure out how to find someones userid that I can use inside their embed code. Anyone know how to find it out?
Tim's project seems to be broken. Figured I'd just copy and paste the solution here. Thanks subZero!
curl -v 'http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/YOUR_USER_NAME&client_id=YOUR_CLIENT_ID'
Simply take a look into the source head section.
<meta property="twitter:app:url:googleplay" content="soundcloud://users:IDHERE">
<meta property="twitter:app:url:iphone" content="soundcloud://users:IDHERE">
<meta property="twitter:app:url:ipad" content="soundcloud://users:IDHERE">
<meta property="twitter:player" content="https://w.soundcloud.com/player/?url=https%3A%2F%2Fapi.soundcloud.com%2Fusers%2FIDHERE&auto_play=false&show_artwork=true&visual=true&origin=twitter">
and several other meta tags ...
Check out What is my SoundCloud user_id? from timpietrusky:
http://timpietrusky.github.io/what-is-my-soundcloud-user-id/
If you want the user id of another user, you need to have their permalink (containing the username). Then you can use the /resolve endpoint from the API to get their data, including the id
Learn more on /resolve in the documentation
If you have the soundcloud user name and just need to find the id (i used it to get the RSS feed for another user): Go to the soundcloud page (eg: https://soundcloud.com/50_cent), right click and view source, look for the id (eg: soundcloud://users:1548017). That's your user id: 548017
Update:
First of all, use documentation Reference /resolve for up to date solution.
http://api.soundcloud.com/resolve?url=http://soundcloud.com/USER_NAME&client_id=YOUR_CLIENT_ID
Replace USER_NAME with user name from regular SoundCloud link like https://soundcloud.com/USER_NAME, and you app's client ID.
Note, there is no .json in /resolve anymore.
Related
I've build my site with Weebly, but there's a problem when I tried to connect my website comment with FB comments. I was unable to solve for a long time, hope any expert can give me some advice. truly appreciate!
sample blog post: http://www.lifechem.tw/blog/170202
the og:url is:
<meta property="og:url" content="http://www.lifechem.tw/1/post/2017/02/170202.html" />
but the default Weebly FB comment tool is for http://www.lifechem.tw/blog/170202 instead of the current og:url
I've tried as other posts suggested
<script>document.write('<div class="fb-comments" data-href="' + document.location.href + '" data-numposts="7"></div>');</script>
but the result was the same as default Weebly tool.
I'd like to add a site-wide code into the blog footer that can copy the og:url in different blog posts.
truly appreciate!!
The location under which this content is shown in the browser is different than your og:url, so only setting that is likely not going to solve it.
But you can easily select the meta element with that property attribute value, and get the content using something like this:
document.querySelector('meta[property="og:url"]').content
(If you need support for older browsers that do not support querySelector, you could use a library like jQuery instead, or any other that support the attribute selector.)
We've inherited an app that uses
<fb:comments href="/article/101" width="500" num_posts="20"></fb:comments>
And the comments work similar to this fiddle: http://jsfiddle.net/Couto/w8xcf/ in that a full url is not specified.
However now they want to get a total of comments for that article for use elsewhere on the site. If it was using the full url as http://domain.com/article/101 we could use an OpenGraph query easily:
https://graph.facebook.com/?ids=http://example.com/
https://graph.facebook.com/comments/?ids=http://example.com/
https%3A%2F%2Fgraph.facebook.com%2Ffql%3Fq%3Dselect%20post_fbid%2C%20fromid%2C%20object_id%2C%20text%2C%20time%20from%20comment%20where%20object_id%20in%20(select%20comments_fbid%20from%20link_stat%20where%20url%20%3D'http%3A%2F%2Fexample.com%2F')%26pretty%3D1>
(sorry, couldnt figure out how to link the above url..)
Anyone know of a way to retrieve the ID facebook is using when someone doesnt specify an href (like the fiddle) or only a relative path? Obviously we could update the fb:comment code to use a full url but we'd lose all the comments for each article... hoping there is a way to avoid that
Hello and thanks for checking out my question.
<meta property="og:image" content="http://www.myurl.com/images/test.png"/>
I have an application that is intended to service multiple "campaigns", each having its own graphic and description I would like to show when someone likes the page. I can update the meta tags all I want but FB will still only use the most recently scraped data (from the nightly scrape or from the linter).
I read that I might be able to cURL to the linter to have it pull the new data right before the like is sent, but what happens when I am servicing hundreds+ of people and multiple campaigns?
Is there any way around this? I have not found any solid solutions after several hours of searching.
tl;dr
I want my posted likes to respect the current meta tags and ignore or update the FB cache for that data.
Each object / page needs its own URL, even if those URLs are handled by the same code -using a query string parameter in the URL to identify different objects is the most common way to achieve this, with server-side URL rewriting being another
I have a Facebook application, which I would like to be able to read facebook group feeds.
I have a user-input feed url, that looks like this: http://www.facebook.com/groups/music.sharing/
To access the feed though, I can only use its id, like this: http://graph.facebook.com/[id of group]/feed
I cannot find anything for that in the reference, FQL doesn't allow querying by name so .. I'm stuck. Any ideas ?
Thanks!
Its not possible right now, there are multiple open "bugs" and another stating the issue...
All the ways I have tried have failed... e.g. (below would work for pages)
fql?q=select id from profile where username='music.sharing'
We are facing this same problem on our current project. It is not an elegant solution that uses the API, but for now we will be using a workaround by scraping the HTML of the group landing page. The group ID number appears four times on this page in the html via links. The most reliable way to search for the ID is to search for "cid=" as it only appears once (right now, anyway) on the page (what follows cid= is the numerical ID). You'll see what I mean when you examine the html of a group page.
If you found a more efficient solution, I'd be grateful if you shared :)
A possible alternative until bug resolution could be: if you are asking your users for permissions then you can ask for the additional permission, user_groups, and then query graph api http://graph.facebook.com/[id of user]/groups. The returned data has group name, id, version, bookmark_order.
I am trying to find a way to embed a share/+1 link for Google+ in a Newsletter, much like the Facebook share and tweeter tweet links can be embedded in a newsletter, which can be achieved with the following two urls:
https://www.facebook.com/sharer.php?u=[URL]&t=[TEXT]
http://twitter.com/intent/tweet?source=sharethiscom&text=[TEXT]&url=[URL]
Is there a similar functionality available for Google Plus?
All I could find on my own, is the Google+ button, which unfortunately uses JavaScript and thus it cannot be used in an email newsletter. I would expect Google to provide a static url fallback, but I cannot find it anywhere.
https://plus.google.com/share?url=http%3A%2F%2Fexample.com
You can share the link on Google+ with the official Google+ share link.
Replace the url parameter with the URL encoded link you want to share.
This one works fine for me :
https://plus.google.com/share?url=your-page-url
The share link allows you to do this. It will work in an email, but it's not quite the same as the +1 button.
To use the share link, add a link element to your email that complies with the Google+ Buttons policy. Set the href attribute to https://plus.google.com/share?url={url encoded share target}
For example, linking to https://plus.google.com/share?url=http%3A%2F%2Fexample.com will allow you to share example.com on Google+: (yes, that is a working demo).
Check out the official docs for more info.
If you use this approach please be aware of the fact that it is not a direct replacement for the +1 button. The link shares the target URL on Google+, but it does not actually +1 the target page. Only the +1 button can +1 a page.
Solution for those who needs custom title, description and image. You should make following changes to target URL:
Step1. add itemscope itemtype="http://schema.org/LocalBusiness" into <html> tag. It will look like <html itemscope itemtype="http://schema.org/LocalBusiness">. More itemtypes here
Step2. Place the follwing meta tags into <head>, change content attributes according your needs:
<meta itemprop="name" content="{Custom title goes here}">
<meta itemprop="description" content="{Custom description goes here}">
<meta itemprop="image" content="{http://www.your_url.com/your_image.png}">
Step3. Add the following link to your newsletter or anywhere you want:
Share it
Tip. To check how google sees your page, you can use this tool http://www.google.com/webmasters/tools/richsnippets. Probably you'll be interested in section Extracted rich snippet data from the page
Good luck, Lauris
I'm using the following.. :)
https://m.google.com/app/plus/x/?v=compose&content=[TEXT]%20[URL]
I personally suggest Google Plus Interactive Posts button
https://developers.google.com/+/web/share/interactive
to use in your apps/websites.Here Google Plus allows many customizations to do according to the requirement. I have used it in my app. Its a better option than Share button.
Maybe this helps. It works (partially) for me.
http://www.stateofsearch.com/share-on-google-plus-any-website/
There has got to be a way to do this by hacking the +1 script.
If you are interested in just changing the apperance you should download and modify this to suit your requirements.
Then, add this to your css:
.Uu .KF {
background: url("your-replacement-image") no-repeat scroll -132px -21px transparent !important;
}
to override the Google icons. However, this is probably very unstable and subject to change.