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

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!

Related

How to create Firebase Dynamic Links from the Admin SDK

Instead of creating a dynamic link inside the iOS app, is it possible to create dynamic links directly from the Admin SDK? For example, I listen for the creation of a document in the Admin SDK, and then create a dynamic link with its path.
Thanks!
As you can see from the Firebase Admin SDK documentation, working with Dynamic Links is not among the many things it can do.
It's possible #ken, Firebase's docs just refer to it as "Email Action Links". Now it depends on what you want to do with the dynamic links...
If your use case falls under one of these 3 generic categories (email password links / sign in / reset links), it's done for you.
https://firebase.google.com/docs/auth/admin/email-action-links
If you want to go beyond that, the API specifies an ActionCodeSettings field which has the parameter dynamicLinkDomain. You may be able to send a dynamic link like this anyway, even if its not explicitly handled for you.
Alternatively, you could make the dynamic links manually via this method, and write the link out in your Admin SDK area (whether thats Node.js or where-ever you're listening for document creation).
https://firebase.google.com/docs/dynamic-links/create-manually
You can do this but not directly from the Admin API. BigMcLargeHuge's answer is correct, but the documentation page from that answer doesn't explain how to generate short links (which is often more desirable).
The documentation that includes short links is here:
https://firebase.google.com/docs/dynamic-links/rest
You just have to make a post request.

Can I change the twitter widget search query dynamclly without stating it in the widget settings page?

I want to embed a twitter widget inside my web-app Using the widget API.
I want to know if I can change the query string inside the embed code without the need to actually change it on the widget settings page. This way I can use the same widget for multiple search queries according to the topic of the page the user is currently at, without the need to create a new widget for each one.
As anyone tried something like this?
Does this on any way violate the terms of service of Twitter?
According to twitter, you can not :(
https://twittercommunity.com/t/change-search-query-from-program/20435

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

custom share image for fb, g+ and twitter using open graph

Is it possible to have a custom share image for Facebook, Google+ and Twitter?
I've already set up the open graph tags in the head of the document.
Thanks
UPDATE:
For Facebook:
<a href="http://www.facebook.com/share.php?u=url" target="_blank" ><img src="fb-img"/></a>
For Twitter:
<img src="twitter-img" />
Still looking for google+
By the way, any difference with sharer.php v/s share.php for Facebook?
I found the best solution to implement custom share button with Facebutton:
Go to facebook developers page and there you will have to read the following article which will explain you how to use meta tags (HTML) on the head of your page:
https://developers.facebook.com/docs/sharing/webmasters
Basically you need to add a Share Button on your page, right?. So, what you need to do is first of all, add the meta tags that page ask you for on the head of your page. Then everything is so easy. After facebook provides you with the code for the share button, now when you click on it, it will show you the image you specified on your meta tags. Take a look at that page and you'll see how easy is to implement it.
Twitter still i haven't implement it yet neither for google :(

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

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

Resources