Implementing Twitter web part in my SharePoint application


#1

Hi All,

I am implementing a Twitter web part in my SharePoint Web part page and unable to implement the below mentioned things.Any help in this implementation is appreciated.Kindly help me.

1)I am implementing the twitter web part using API referred through the following link https://dev.twitter.com/rest/public/search,but I am unable to make a limit of the number of tweet and also unable to hide the image or Video coming in the content.

2)Also I want to make some look and feel change for the content like changing the heart sign to star for the Like button also want to take the retweet option which is not coming for the moment.

Is there any way to do this?

Many thanks in advance for your help.


#2
  1. GET search/tweets supports the count query parameter where you can specify count=25 and up to 25 tweets will be returned. There is also a search filter of filter:media that restricts results to have media and it looks like you can exclude media results with -filter:media. The filter modifier goes within the q= query parameter as part of the search string.

  2. Statuses should be displayed according to the brand guidelines in the starterkit download https://brand.twitter.com/


#3

Hi Abraham,

Thanks for your reply.

Kindly find out my comments on each issue in below:-

1)This is my API request URL but the resulting JSON HTML does not really limit the number of tweets or delete the media content for me.

https://publish.twitter.com/oembed?url=https%3A%2F%2Ftwitter.com%2FexPageName?count=5&filter:media

2)Could you kindly become a bit descriptive on this issue?

Many thanks in advance for your kind reply.

Regards,
Bidisha


#4

Twitter has Display Guidelines which describe how Tweets should be displayed on screen, in apps and in media. If you visit the brand.twitter.com page you can download a zip file containing the rules and showing examples. You should not change the Twitter marks (like altering the heart, for example).

If you use our embedded Timeline widgets that are available via publish.twitter.com, then they will take care of the look-and-feel for you and ensure that you are compliant.


#5

The oEmbed API is very different from the Search API you were originally talking about. If you read the Twitter Timeline oEmbed API docs you’ll see that a limit keyword is supported. I don’t think the oEmbed timeline supports hiding media.

https://publish.twitter.com/oembed?url=https%3A%2F%2Ftwitter.com%2Ftwitter&limit=1

#6

Nicely noticed - I didn’t pay attention to the first half of the question(s)!

There’s no option not to show media with the Twitter web embeds of oEmbed. This is to respect the original intent of the poster.


#7

Hi,

I tried with this URL and appended the returned JSON HTML to a div but it’s not working.

Could you kindly tell me where is the mistake?

https://publish.twitter.com/oembed?url=https%3A%2F%2Ftwitter.com%2Ftwitter&limit=5

Many thanks in advance.

Regards,
Bidisha


#8

When you say this is not working, can you be more specific about what is failing? Are you unwrapping the HTML from the JSON string properly? What browser is this failing in?