-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding images and decription to tweets #1958
Comments
This is a multi-step issue, but we're here to help! Please open a pull request with your initial code and feel free to ask for help - we can look it over and provide support. |
Can i claim it 😀 ? |
Yes @Mujadded , go for it ! Feel free to ask any doubt regarding the issue . |
@jywarren , is it live ? |
Not yet - it didn't quite make it by the Friday night update. I'll probably
run an update today too, though! Let's check back in!
…On Sun, Jan 14, 2018 at 12:25 AM, Sagarpreet Chadha < ***@***.***> wrote:
@jywarren <https://github.com/jywarren> , is it live ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1958 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ2wDLBOTQwHteXFoa9SbpagOEImZks5tKY_ZgaJpZM4Ra1ti>
.
|
It'll shortly go up on staging.publiclab.org -- check it out there to see
if the RSS feed looks correct! Then we'll publish later in the day. Thanks!!
…On Tue, Jan 16, 2018 at 12:53 PM, Jeffrey Warren ***@***.***> wrote:
Not yet - it didn't quite make it by the Friday night update. I'll
probably run an update today too, though! Let's check back in!
On Sun, Jan 14, 2018 at 12:25 AM, Sagarpreet Chadha <
***@***.***> wrote:
> @jywarren <https://github.com/jywarren> , is it live ?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1958 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABfJ2wDLBOTQwHteXFoa9SbpagOEImZks5tKY_ZgaJpZM4Ra1ti>
> .
>
|
OK, it's live now! |
https://publiclab.org/feed.rss seems to be not working . Looking into it . |
server log:
|
easy fix! and we should make a functional test for this :-) |
Sorry, TravisCI is stalled for some hours ... waiting for that to come back before publishing! |
The feed is now working: https://publiclab.org/feed/liked.rss I just enabled the IFTTT recipe too. Fingers X! |
And i posted a photo and liked it -- this should trigger the script! https://publiclab.org/notes/warren/01-18-2018/pre-order-the-community-written-pocket-guide-to-grassroots-mapping |
Error:
|
I've turned the IFTTT script off for now! I wonder what happened? |
Ooh, do we need an "enclosure" line? As per https://sagarpreet-chadha.github.io/feed.rss
|
OK i got |
I'll be able to re-activate using this: https://ifttt.com/applets/70744657d-rss-feed-to-post-a-tweet-with-image-and-url |
Oh so sorry , i had an exam in college , couldn't respond earlier . |
The latest feed seems to work fine on my test setup : |
The image is shown due to Tested this here : https://github.com/sagarpreet-chadha/sagarpreet-chadha.github.io/blob/d044a8c9a7124909dba78e0e2570b65a35f6d96a/feed.rss#L154 |
@jywarren , you were right it gets auto-truncated 😄 !! |
Reopening -- one more thing, it tries to post an image even if there isn't an enclosure tag... Not sure how to stop this! We may need to use a default image? But that's not a great solution. @ebarry @steviepubliclab could we use someone's profile picture? |
Are you totally sure about enclosure? I think we have to do more testing. And to figure out how to not post an image if there isn't one. |
This is a tough one! I disabled the ifttt script for now. Thanks for working on it! |
I agree this is indeed a tricky one , learned a lot though . Thank you ! |
OK, i've hooked it up to https://twitter.com/pl_testing and
https://gist.github.com/jywarren/055bf4471dbdfff6a1ebd21bf15c3c8f; will add
a new item soon and see if it works.
…On Thu, Jan 18, 2018 at 12:04 PM, Sagarpreet Chadha < ***@***.***> wrote:
I agree this is indeed a tricky one , learned a lot though . Thank you !
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1958 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ_yWoPuqd1PmDZ0JLEojW2Ef3OlWks5tL3mtgaJpZM4Ra1ti>
.
|
Hmm, i can't seem to get this working effectively. Can you double check that |
Also , https://gist.github.com/jywarren/055bf4471dbdfff6a1ebd21bf15c3c8f file shows following errors according to https://validator.w3.org/feed/check.cgi . I think resolving these and removing |
Also @jywarren , i was thinking of not using the IFTTT recipes as these are not very flexible . I was thinking of using twitter gem , it has a very easy function |
Hi, you know, I think that the twitter gem may be a way forward. But it does sound like a big project, and after all we have an API and RSS feeds specifically for integration -- i don't (architecturally) much like the idea of baking additional channels of publication into the core code. I'd like to give this another attempt. Let's, for now, assume we can fall back to a profile picture if that exists, and the Public Lab logo (publiclab.org/logo) if /that/ doesn't exist. So the remaining problem is how to get the image to appear in Twitter. Actually while I see your test looks good, it only demonstrates that the image makes it into the RSS feed and is RSS compliant. We also need to know that the IFTTT feed is reading either the image from the item content, OR from the One clue, however, is that your original demonstration that got all the way to Twitter, included Let's see if we can narrow down the problem using your original demo. Can you do your original test (https://sagarpreet-chadha.github.io/feed.rss) using Thanks -- this is complex and I appreciate your time on it! |
It could also be the |
Hi , working on it . Also @jywarren , i was thinking of an alternative and thought of this : 1.) Use this recipe to post on FB page : 2.)And then using this recipe , to post on Twitter (image is handled automatically and also description comes automatically) : What do you think ? |
hmm, it's not |
Oh, cool -- maybe that can work! Does the Facebook/Twitter hybrid handle when only some posts have images? |
yeah, nope -- |
OK, for reference, none of the last ~8 items in this feed work: https://publiclab.org/feed-tmp.rss |
Yes @jywarren , Unfortunately when the FB post does not has image then this recipe is working https://ifttt.com/applets/10891p-share-facebook-page-updates-on-twitter and when FB post has an image then this https://ifttt.com/applets/263954p-autopost-from-facebook-page-to-twitter is working fine . Also in FB post , if we give only the link of node in the RSS , then the FB automatically fetches the image (if any) . |
I think this combination of recipes may work ! What do you think ? Also mine RSS Feed to Twitter is not working , so i am not able to test the RSS feed . Trying to resolve this ! Thanks 👍 |
…b#1966) * adding tweet image and description (publiclab#1958) * Author name changed in rss ( fixes publiclab#1958 )
Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!
The Problem
Currently the tweets on PublicLab account have format :
![screen shot 2018-01-11 at 6 25 28 pm](https://user-images.githubusercontent.com/14952645/34826552-fde0b91c-f6fc-11e7-8569-f7da50890440.png)
The problem is that the image is not shown on tweets and the description of the shared article is not shown .
Example : For research note , https://publiclab.org/notes/cutlan/01-09-2018/kilimanjaro-citizen-science-1 , the tweet is this .
Solution
We need to change the tweets to this format :
The tweets are generated from the recipe (Learn more about recipes from here) https://ifttt.com/applets/66362400d-rss-feed-to-post-a-tweet-with-image-and-url , which tweets whenever there is change in the RSS feed of Publiclab.com site https://publiclab.org/feed.rss .
We need to change the format of our RSS Builder , https://github.com/publiclab/plots2/blob/master/app/views/notes/rss.rss.builder to produce correct RSS Feeds .
The correct RSS feed has format similar to this , https://sagarpreet-chadha.github.io/feed.rss (this is a static feed only for testing).
Also , you can verify that the generated xml is of correct format from this site , https://validator.w3.org/feed/check.cgi .
1.) Basically to add images and description , we need to add this :
<![CDATA[ <img src="http://img02.mini.abroad.imgcdc.com/english/photos/fun/90/20170711/1017495_339353.jpg.680x425.jpg" alt="Smiley face"> ]]>
inside the
<description>
tag ,plots2/app/views/notes/rss.rss.builder
Line 20 in 76da532
2.)We need to remove the image tag inside
<item>
tag as<image>
tag is not valid inside<item>
tag .Remove :
plots2/app/views/notes/rss.rss.builder
Line 19 in 76da532
3.) Format of
<author>
tag is incorrect currently . The correct format is<author> email-id (User-name) </author>
.plots2/app/views/notes/rss.rss.builder
Line 15 in 76da532
Feel free to ask any doubt regarding the issue ! Thank you !
Steps to Fix
commit your changes and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
Please email the developers list (see https://publiclab.org/wiki/developers) or go to the chatroom if you have questions, and take a look at our first-timers landing page for more information!
The text was updated successfully, but these errors were encountered: