twitter embed timeline no longer works as of today? - twitter

Hi I am receiving the following error (on all my sites) when the site attempts to embed a twitter account timeline. I looked at the status page https://api.twitterstat.us/ and it makes no mention of any problems with twitter...
https://cdn.syndication.twimg.com/timeline/profile?callback=__twttr.callbacks.tl_i0_profile_ingentaconnect_old&dnt=false&domain=ic.ox-dev-01.ingenta.com%3A9151&lang=en&screen_name=ingentaconnect&suppress_response_codes=true&t=1829998&tz=GMT%2B0000&with_replies=false net::ERR_ABORTED 404
fetch # widgets.js:8
Here is the embed code:
<a class="twitter-timeline" data-height="340" href="https://twitter.com/ingentaconnect?ref_src=twsrc%5Etfw">Tweets by ingentaconnect</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Note I'm based in UK if it is relevant.

This worked for me perfectly.
A workaround is to get https://platform.twitter.com/widgets.js; in its code, change https://cdn.syndication.twimg.com to https://syndication.twimg.com, store within your website and when embedding Twitter timeline, use your modified version instead of https://platform.twitter.com/widgets.js.
Here is the link on twitter where the discussion was done:
https://twittercommunity.com/t/embedded-timeline-does-not-show/168085/10

Related

swift - Fetching OpenGraph meta tags from URL

I'm trying to fetch og (OpenGraph) tags from a URL and display in the app. I get the tags properly for most of the websites, but for some, I don't.
ex. This URL
When I render it on the browser and inspect, it shows me the meta tags, but when I try to fetch the html via cURL, it returns a html content without any meta. But, when I share the URL in Slack or FB, it renders the preview with the OG tags.
How do I do it on iOS?
Any help is appreciated.
The problem with the URL you shared is that the site requires Javascript to be enabled.
If you don't have Javascript enabled, you just get back a basic page saying that you need to have Javascript enabled to browse the site (hence, no Open Graph tags).
Your browser, Slack and Facebook execute Javascript but cURL does not. Neither will a URLSession in iOS.
In iOS, the only way you're going to be able to get access to the HTML for such a website is to use a WKWebView to render the page.
Then, when it's loaded, execute some Javascript using evaluateJavascript(_:completionHandler:) to get the OG tags.
That's the only workable solution for these cases using iOS libraries.
The iOS client for Facebook, LinkedIn etc do not do this on their iOS client. Their iOS client calls their backend, passing the URL for processing, and receives back the preview. Javascript is executed as part of this backend process.
There are public APIs around that will help you to do the same thing, such as:
https://opengraph.io

Twitter web intent not prepending # sign to `via` parameter

I am using a simple Twitter web intent (hyperlink) from a mobile-focused website that is intended to allow the visitor to compose a tweet pointing back to a page on my site. The intent is populated with various parameters, including a via parameter that holds a Twitter handle:
https://twitter.com/intent/tweet?url=...&via=MyTwitterHandle
When the link is clicked on most platforms, it opens twitter.com in the browser, and everything works as expected. The Twitter compose dialog opens with all of the information from the link prepopulated.
However, on iOS 9 devices that have Twitter installed, something's wrong. As expected with Universal Links, the native Twitter app handles the click. But when it loads, the via parameter (which holds my Twitter username) is populated without the # sign prepended. The native compose dialog looks something like this:
Because the # character is not prepended, Twitter doesn't recognize it as a username.
I've found two mentions of this problem on Twitter's developer site, but no solutions.
While contrary to the documentation for the Tweet Intent, I've tried including the # sign in the via parameter itself, but that results in ## in the very common case where the mobile web Twitter interface is used.
What other solutions do I have for a very simple Tweet intent that includes the via parameter and works across all major mobile platforms?
Not really an answer but I just tried and it seems like the problem is fixed as of 17th March 2016!

Twitter Widget Not Working on Mobile

I have a few sites that display twitter feeds using the blogger.js & twitterCallback2 scripts.
The twitter feed shows up great on desktop versions of the site, but on mobile it does not load. I get an error message...
"Failed to load resource: the server responded with a status of 404 (Not Found) | mobile.twitter.com/javascripts/blogger.js"
So it looks like it tries to load a mobile version of the script, but the script is not there.
Anyone else have a similar problem?
We recently had this problem on some of our Wordpress websites.
The link mobile.twitter.com/javascripts/blogger.js should just be twitter.com/javascripts/blogger.js
Since twitter has a mobile redirect, it wouldn't allow us to use this link for mobile. So we made our own blogger.js
Here's a link on how we resolved it. Hope this helps:
http://www.clarkcommunications.ca/twitter-widget-not-working-on-mobile/

Error: executing module function 'setInfo'

I have two problems: (IOS + XCode + PhoneGap)
After doing Hackbooks Facebook login I load an iframe which loads fine. When I click a like button from my app, it takes me to a Facebook login page. How come it does that when I'm already connected?
When the login page of Facebook comes up and I sign in, I get a blank page and I get a console error saying: "Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.9.0.js file?" I have the JS file in my WWW folder.
Can someone please give me a hand?
Maybe try this:
http://docs.phonegap.com/en/1.9.0/guide_upgrading_ios_index.md.html
I don't know much about Facebook logging so I can't help much with Question 1, but for Question 2 it sounds like you are getting redirected after login to a page that does not include cordova-1.9.0.js.
Your index.html must be including the js file for you app to be doing anything, but apparently you are getting redirected back to a different page, so make sure that page also has a script tag for cordova-1.9.0.js.
You need this:
<head>
<script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js">
</script>
</head>

Share link on Google+

Is it possible to share/post to Google+ without using the +1 button?
e.g. Like a normal tweet button works with a url link: http://twitter.com/share?url=httpetcetcetc
Yes, you can.
https://plus.google.com/share?url=YOUR_URL_HERE
Edit: It works only with eff.org.
Edit: As of March 2012 it works on all sites.
Documentation for this sharing method is available on the Google Developers site.
New Google share link:
http://plus.google.com/share?url=YOUR_URL
For secure connection:
https://plus.google.com/share?url=YOUR_URL
For Wordpress:
https://plus.google.com/share?url=<?php the_permalink(); ?>
Yep! Use the link:
https://m.google.com/app/plus/x/?v=compose&content=YOUR_TEXT
It's SHARE url (not used for plus one) button.
If this will not work (not for me) try this url:
https://plusone.google.com/_/+1/confirm?hl=ru&url=_URL_&title=_TITLE_
Or see this solution:
Adding a Google Plus (one or share) link to an email newsletter
As of July 25, 2011, the answer is no.
I have looked through their Javascript and it seems they don't want anyone directly accessing their api for +1 at the moment.
The Javascript that does all of the work for the +1 button is here:
https://apis.google.com/js/plusone.js
If you run it through a Javascript cleanup program you can tell that they have obfuscated their code with various functions that only start with letters and constantly refer back to themselves and do cryptic things.
I figure in the next couple of weeks or moths they will release a link based sharing api due to the fact that we will need this for sharing from flash and other web based formats that don't rely on pure html and js.
i used following links in my wordpress website for sharing my blogs,they work fine:
whatsapp share : https://wa.me/?text=(some-text)(your-link)
facebook share: https://www.facebook.com/sharer/sharer.php?u=(your-link)
linkedin share: http://www.linkedin.com/shareArticle?mini=true&url=(your-link)
google-plus : https://plus.google.com/share?url=(your-link)
twitter share: http://www.twitter.com/share?url=(your-link)
<meta property="og:title" content="Ali Umair"/>
<meta property="og:description" content="Ali UMair is a web developer"/><meta property="og:image" content="../image" />
<a target="_blank" href="https://plus.google.com/share?url=<? echo urlencode('http://www..'); ?>"><img src="../gplus-black_icon.png" alt="" /></a>
this code will work with image text and description please put meta into head tag
No, you cannot. Google Plus has been discontinued. Clicking any link for any answer here brings me to this text:
Google+ is no longer available for consumer (personal) and brand accounts
From all of us on the Google+ team,
thank you for making Google+ such a special place.
There is one section that reads that the product is continued for "G Suite," but as of Feb., 2020, the chat and social service listed for G Suite is Hangouts, not Google+.
The format https://plus.google.com/share?url=YOUR_URL_HERE was documented at https://developers.google.com/+/web/share/, but this documentation has since been removed, probably because no part of Google+ continues in development. If you are feeling nostalgic, you can see what the API used to say with an Archive.org link.

Resources