Topic-icon How to Force JFBConnect to Grab K2 Item Title

Support Specialist
9 years 4 months ago #49993 by alzander
Twitter does not use Open Graph tags at all. They use their own Twitter Card syntax, which is what you included above. Try running your page through their card Validator and make sure things are working right.. and make sure you submit your site for approval so that they actually use your tags:
cards-dev.twitter.com/validator

Another thing for twitter, I am trying to keep the character count down so I have created an alias for www.911truthoutreach.org of 911to.org.

This is really unnecessary. Twitter auto-shortens all URLs using their t.co shortener. All URLs may 'show' as the long URL, but they've been shortened automatically. Using your own short URL is only good for clarity when reading where the link goes, but not for making it easier to create longer tweets.

When using the Create Post feature of JFBConnect, we automatically convert the URL of the current page to the t.co link as well. So, in general, I wouldn't recommend the hassle you're trying to go through unless you need it for visual sake.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago - 9 years 4 months ago #50000 by webdevtim
First, I am not sure what it means to submit the site to twitter for approval. Is that the same as running a page through their Card Validator? Our Twitter App has been approved since December 18, 2014.

Also I would assume that I have to validate for every page that I want to have Tweeted. Is that correct?

I am getting the following error when running the Twitter Card Validator:

9/11 Truth Outreach @911TruthOut
The card for your website will look a little something like this!

Unable to render Card preview

Log

ERROR: FetchError:exceeded 4.seconds to Portal.Pink-constructor-safecore while waiting for a response for the request, including retries (if applicable) (Card error)


When I look up this error, it indicates that the robots.txt file doesn't allow twitterbot access to the site.

When I explicitly allow twitterbot access to the entire site:

User-agent: Twitterbot
Disallow:

I still get the same error message when running the Twitter Card Validator.

I am obviously missing something here: Should I ask twitter to determine the problem?
I noticed the HTML for the page I was validating that the twitter:site meta tag isn't present. Is this the one instance where the twitter meta tag has to be present? i.e. <meta name="twitter:site" content="@911TruthOut" />

Also Twitter does use the Open Graph og: tags in the event that there aren't the equivalent twitter:card tags.

Twitter Cards and Open Graph

You’ll notice that Twitter card tags look similar to Open Graph tags, and that’s because they are based on the same conventions as the Open Graph protocol. If you’re already using Open Graph protocol to describe data on your page, it’s easy to generate a Twitter card without duplicating your tags and data. When the Twitter card processor looks for tags on your page, it first checks for the Twitter property, and if not present, falls back to the supported Open Graph property. This allows for both to be defined on the page independently, and minimizes the amount of duplicate markup required to describe your content and experience.


Example:
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@nytimesbits" />
<meta name="twitter:creator" content="@nickbilton" />
<meta property="og:url" content="http://bits.blogs.nytimes.com/2011/12/08/a-twitter-for-my-sister/" />
<meta property="og:title" content="A Twitter for My Sister" />
<meta property="og:description" content="In the early days, Twitter grew so quickly that it was almost impossible to add new features because engineers spent their time trying to keep the rocket ship from stalling." />
<meta property="og:image" content="http://graphics8.nytimes.com/images/2011/12/08/technology/bits-newtwitter/bits-newtwitter-tmagArticle.jpg" />

And there are several types of Twitter Cards such as:

Summary Card: Default Card, including a title, description,
thumbnail, and Twitter account attribution.

Summary Card with Large Image: Similar to a Summary Card, but
with a prominently featured image.

Photo Card: A Card with a photo only.

Gallery Card: A Card highlighting a collection of four photos.

App Card: A Card to detail a mobile app with direct download.

Player Card: A Card to provide video/audio/media.

Product Card: A Card optimized for product information.

How do I indicate these cards for different types of content pages in JFBConnect?
Last edit: 9 years 4 months ago by webdevtim.
The topic has been locked.
Support Specialist
9 years 4 months ago #50004 by alzander

First, I am not sure what it means to submit the site to twitter for approval. Is that the same as running a page through their Card Validator? Our Twitter App has been approved since December 18, 2014.

When you use the validator, if it passes, it should ask you to submit it so that the tags will actually be used in future tweets as the preview. If you don't see that option, all is good, it means you're probably already approved.

Also I would assume that I have to validate for every page that I want to have Tweeted. Is that correct?

Nope. The validator is like Facebook's Open Graph tool. It's just to test the tags. Once you've submitted for approval, your whole domain will be approved and you'll never have to do that again.

I am obviously missing something here: Should I ask twitter to determine the problem?

I'm not sure at all what's causing that. Something on the server is preventing them from contacting your site. That's a problem that's likely outside of our ability to help.

I noticed the HTML for the page I was validating that the twitter:site meta tag isn't present. Is this the one instance where the twitter meta tag has to be present?

twitter:site is an optional tag. You can add it if you want, but it's not required.

Also Twitter does use the Open Graph og: tags in the event that there aren't the equivalent twitter:card tags.

Nice! That's new info to me. They used to explicitly ignore tags and only used their own. Good to hear they're playing nice now.

How do I indicate these cards for different types of content pages in JFBConnect?

Right now, we only support the summary card by default. You may be able to set a custom tag on specific pages for other card types, but I'd have to look into how to do that better.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago #50006 by webdevtim

When you use the validator, if it passes, it should ask you to submit it so that the tags will actually be used in future tweets as the preview. If you don't see that option, all is good, it means you're probably already approved.

I will have to wait and see if the correct image starts appearing in the tweets.

Nope. The validator is like Facebook's Open Graph tool. It's just to test the tags. Once you've submitted for approval, your whole domain will be approved and you'll never have to do that again.

This is really good to know, I was fearing that I would have to validate as part of the articles editing process.

I'm not sure at all what's causing that. Something on the server is preventing them from contacting your site. That's a problem that's likely outside of our ability to help.

I have been perusing the forums, and it seems the validator goes down from time to time, so maybe that is what I am experiencing. I asked Twitter if this was the case and I will let you know what they tell me when they get back to me.

twitter:site is an optional tag. You can add it if you want, but it's not required.

Thanks, since Twitter makes a big deal about this how would I add it other than manually?

Right now, we only support the summary card by default. You may be able to set a custom tag on specific pages for other card types, but I'd have to look into how to do that better.

I can't add another head tag so I will have to think about how to do that on a page by page basis. I see that as a major coding issue for you because you would have to add that as attribute to the plugin tag and an option in the module; adds another level of complexity.
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago #50007 by webdevtim
I just posted to our channels and the post to Facebook was successful, but the post to twitter failed.
The topic has been locked.
Support Specialist
9 years 4 months ago #50013 by alzander

I can't add another head tag so I will have to think about how to do that on a page by page basis.

It's in our to-do list to allow adding custom Twitter Card tags just like we have support for Open Graph support. It's not been a highly requested feature though, so hasn't been a huge priority. Each type of Twitter Card (summary, photo, etc) needs to be approved for use on your site, which is more complex for users to go through as well.

I just posted to our channels and the post to Facebook was successful, but the post to twitter failed.

What happened when you tried to post to Twitter? What message did you get when you tried? Have you gone through the full channel setup and did you re-authenticate with the Twitter user and accept the "Can Post" permission on that login?

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago #50014 by webdevtim

Each type of Twitter Card (summary, photo, etc) needs to be approved for use on your site, which is more complex for users to go through as well.

I have read twitter developer post where some people have been waiting months for each approval, unless you're Katie Perry or someone like that, then you get expedited.

What happened when you tried to post to Twitter? What message did you get when you tried? Have you gone through the full channel setup and did you re-authenticate with the Twitter user and accept the "Can Post" permission on that login?

No I didn't re-authenticate.
The topic has been locked.
Support Specialist
9 years 4 months ago #50017 by alzander
Katy Perry doesn't use JFBConnect.. yet :) I've heard similar things about approving other card types.. but the summary (which we support natively) is an automatic approval.. hence, why we support it specifically. Things could always change though.

As for the Twitter Channel, please re-authenticate and let us know how that goes.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago - 9 years 4 months ago #50018 by webdevtim
I re-authenticated and was able to post to our twitter account successfully.

Thanks a million Alex.

Well not quite, this is what the post looks like.



I need our post to look as good as the one below it, but I want ours to be grabbed from the information in the K2 item.
I feel like a kindergarten student asking the teacher way too many questions, but I have to get this done right, and the twitter documentation isn't really helpful here as it makes suggestions for the html to include on a page.
Last edit: 9 years 4 months ago by webdevtim.
The topic has been locked.
Support Specialist
9 years 4 months ago #50021 by alzander
The post you show is what will happen if:
1) You haven't added a comment (just a link will show).
2) You haven't submitted your site using the Twitter Validation tool (no preview will show).

I hope that helps, but if not, let us know, as always.

Thanks,
Alex
The topic has been locked.