How do you create a twitter link that auto-populates the users status with some text? - twitter

How do you create a link (<a>) that will send the user to Twitter and auto-populate the status field with some text? I've clicked links like this before, but not sure how it's created.

Just as a note to anyone who finds this in 2014 onwards, Twitters API has moved on and you now have to use http://twitter.com/intent/tweet?text=
More info can be found on this blog article http://camgould.com/blog/posts/creating-a-link-that-posts-a-tweet

Point the link to http://twitter.com/home?status=some_text

Related

Get a review link with Google My Business API

Is there a way to get the link of a review using the GMB APIs?
The closest to what I need is this:
https://www.google.com/maps/contrib/113400145807499011881/place/ChIJSRSm38NhLxMRBgg2EGMZqKc/
Where the first ID (113400145807499011881) is the ID of the user who left the review, and the second ID (ChIJSRSm38NhLxMRBgg2EGMZqKc) is the place ID.
However, the review object returned by the API does not seem to contain enough information to obtain the reviewer user ID.
Thank you,
Guido
I was searching for a way to get the url to the review overview for a specific location via the API too.
After checking the links, IDs ect. in the API Responses and lots of documentations an tuturials i found NO way to get the link over tha API.
BUT a workarround with a few manual steps can help to find the link (I know that is not a final answer to the question, but maybe it is still helpfull)
go to google search, and search for you Location/ Company that contains the reviews
on the right side you should see a pannel that shows the current stars for your location and a link "xxxx Google-Rezensionen"
klick on this link and copy the url in the browser
(optional remove parameters like "&client" ect.
Check this youtube-video of the Step by Step Tuturial to see a tuturial how you can do this.
newReviewUrl is the Parameter if someone read this:
https://developers.google.com/my-business/reference/rest/v4/accounts.locations#urlattributevalue

Content to share in Facebook is empty [duplicate]

I could set custom picture and caption for link. Now it is impossible for v2.9. Is there some kind of workaround without specifying og: tags.
When using Facebook Graph v2.8, you could post a link and display a custom image and not the "og:image".
This was done by adding the picture parameter to the hook.
https://graph.facebook.com/v2.9/me/feed?link=https%3A%2F%2Fwww.google.com%2F&picture=https%3A%2F%2Fi.ytimg.com%2Fvi%2FtntOCGkgt98%2Fmaxresdefault.jpg&name=test&message=this%20is%20a%20test&access_token=**********
The graph API is at 2.9 and as per the documentations this is still supposed to work Facebook API doc
However, it keeps getting overridden by the scraped image. Is anyone else experiencing this problem or have a workaround.? Facebook API Explorer
picture, name, caption, thumbnail, description are all set to be deprecated.
https://developers.facebook.com/docs/apps/changelog#v2_9_90_day_deprecations
You can go ahead and use Open Graph for posting images with custom description and title.
You can get an insight of the same from this link -> https://developers.facebook.com/docs/sharing/webmasters?hc_location=ufi

Using Gmail message source, generate direct link

So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface?
on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following
https://mail.google.com/mail/#all/<HexEncodeMessageID>
Is this related to the Message=ID header found in the mail's source?
Message-ID: <SomeID#SomeID.mail>
The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions.
Update
This bookmarklet no longer works. See Benjamin Ziepert's update.
Original Answer
I decided to make a bookmarklet to help automate this.
javascript:window.location="https://gmail.com/#search/rfc822msgid:"+encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/i)[1])+"/"+encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function(x){return x.slice(0,3) == "th="})[0].slice(3));
Save this link on your bookmarks bar.
To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
If anyone has suggestions for a clean way to do this without having to click show original, I'm all ears.
The "HexEncodeMessageID" that you refer to (and that occurs in links such as https://mail.google.com/mail/#inbox/14197d2548c9da1a) is unfortunately different from the RFC822 message ID (which occurs in the source of the email).
I do not know of any way to get a direct link to an email using the RFC822 message ID, but it is possible to search for a particular RFC822 message ID in Gmail (see GMail doc):
in:anywhere rfc822msgid:SomeID#SomeID.mail
You can turn this into a link:
https://mail.google.com/mail/#search/in%3Aanywhere+rfc822msgid%3ASomeID#SomeID.mail
(Don't forget that the message id should be URL-encoded. You can also just type the search in your GMail and copy the resulting URL afterwards.)
The problem with this link is that it does not send you to the mail directly, but to a search result page with a single hit. But this might be good enough for some applications.
The advantage is: The RFC822 is the same in your account and in the account of the sender. So if you want to refer to a given email in an email/chat, you can provide this search link (assuming the recipient also uses GMail). With the "HexEncodeMessageID" this would not work, because it is different in every account (according to my own experiments).
One last thing: the link only works when you are already logged in.
Here's an updated bookmarklet over what Benjamin Ziepert suggested. Basically with removed /u/0 part to make it a little more account-independent.
javascript:window.open("https://mail.google.com/mail/#search/rfc822msgid%3A" + encodeURIComponent(document.getElementsByClassName('message_id')[0].innerHTML.slice(4, -4)), "_self");
Usage: Save this link on your bookmarks bar. To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.

What is data-widget-id in twitter api ? How i can get the data-widget-id?

I have some problems with previous version of the twitter api and I want to move to latest version. I see some information here https://dev.twitter.com/docs/embedded-timelines.
What is data-widget-id here. I want to show some specified people tweets in my website.
How do I do that?
Your question is already answered on the Twitter Developers page.
To create a timeline you must be signed in to twitter.com and visit the widgets section of your settings page. From this page you can see a list of the timelines you've configured and create new timelines.
Sign in on twitter.com
Create a new widget
The widget-id is provided by Twitter (you will be redirected to https://twitter.com/settings/widgets/xxxxxxxxxxxxxxxxxxx/ - the xxx is your widget-id)
Found the solution.
You can override the data-widget-id parameter in the widget by additionally setting the data-screen-name parameter inside the a tag of the widget. Like this:
<a class="twitter-timeline" href="https://twitter.com/<%= escape_javascript(#site.twitter_username) %>" data-widget-id="363460440807833600" data-screen-name="garzagabriel"></a>
NOTE: You still need to include the data-widget-id parameter. So generate the widget first by going to https://twitter.com/settings/widgets, and then add the data-screen-name parameter to the a tag in the embed code (like shown above)
Here is the documentation for this: https://dev.twitter.com/docs/embedded-timelines#timeline-selection
Best!

Food Styles field from Facebook OpenGraph API

Is it possible to get the food styles from the facebook Open Graph API? For some reason I can't seem to get it from the fb_graph gem and was wondering if it was just not available from facebook's perspective.
No you cannot get this field from the graph API nor directly by using FQL.
If you look at the available fields for a Page, it is not listed. The doc also states:
Pages may also contain other (or additional) category-specific fields.
However, if you use the APIs to get the info for a restaurant Page, the Food Styles are left out, as the links from this thread demonstrate.
Here is another example where you can see that the info is unavailable, which is for a restaurant in Tokyo:
http://graph.facebook.com/hakusyu
No it is not possible (as at the time of writing). But it should be. I filed a bug.
In the future, when something like this appears to be askew, please do so too: https://developers.facebook.com/bugs

Resources