How to update Twitter status with image in Rails application? - ruby-on-rails

I have been trying to use twitter api https://upload.twitter.com/1/statuses/update_with_media.json
to post tweet along with image (with OAuth). But i am continuously facing issues with uploading image for the past 3 days.
I have posted my question in StackOverflow here. But cannot able to find a solution.
Do i have to use anyother method to achieve this?

Related

How to intergrate a single tweet into your website

Right now im building a simple html/css site for a friend. The homepage is a series of grid block divs that hold some content.
There are currently 3 block divs we have marked for social media posts. So for example, he wants his latest tweet to appear in one of those divs. His latest instagram post to appear in another and facebook in the last.
We can ignore facebook for the time being as I'm only focusing on the twitter/instagram for now.
I'm struggling with where to begin for this project. In the past I have only embedded twitter timelines, Instagram posts using widgets etc....nothing too complicated.
But for this project I will need separate stripped down posts, ie: just the plain text from his tweet inside the twitter div. The image from his Instagram post as the background image on the Instagram block etc...
I've spent the last few hours trying to get my head around oEmbed, and I can safely say I'm failing miserably.
I'm actually more confused now then before I started, so if any kind soul could give me a dummies guide to how I can approach this, that would be absolutely amazing.
Thank you!
You can acheive a single embedded tweet using an embedded timeline.
To get just one tweet, use the data-tweet-limit attribute on the embed tag, as detailed here:
https://dev.twitter.com/web/embedded-timelines/parameters
For example:
<a class="twitter-timeline" href="https://twitter.com/TwitterDev" data-widget-id="some_id" data-tweet-limit="1"></a>
According to twitter's documentation, that is the recommended way of getting tweets onto websites. From your description of the use case, I'd highly recommend just using Twitter's official widget.
If you really want to use Twitter's REST API and generate your page server side, I'd check out this stack overflow question as a starting point:
Setting up Twitter API, getting the last few Tweets
Hope that helps!

how to get twitter feeds in shopify

I am trying to get twitter feeds in to my shopify site. I want to get the feeds and style them as I want and thus cant use a app.
I know how to do it using PHP but can not use that code in shopify and looking for a way I can use OAuth in shopify and get the feeds. I tried the shopify docs but without an example its kinda hard to actually get my head around it.
http://docs.shopify.com/api/tutorials/oauth
Thats the link I am using as a guide. If anyone can direct me to an example which might be similar that would be awesome. (google didnt seem to be that helpful this time either)
Cheers
I know you said you didn't want to use an app, but can I suggest taking a look at Twitify? You can use custom CSS to style your tweets. Also see discussions about Twitify here and here.
Twitter changed their display guidelines and policies on embedding of tweets on websites in June 2013. One of the themes I used for a client earlier in the year had custom styling of tweets, and they have now changed it to use the official Twitter widget to meet the new guidelines. In fact, the images on the Shopify theme store show how it used to look before Twitter changed things:
And after:
I think using an app like Twitify would be the easiest way to deal with these changes to embedding tweets.
Thanx for the suggestion. I did take a look at that before I posted this question. This is a project for a client and I dont think getting a plug in is a viable option. Anyways I found a work around.
Hosted the file on a server and then accessed it. So that resolved the problem. :)
I used node.js to write the script and get the posts as required.
Cheers.
you can use the app for that Twitify https://apps.shopify.com/twitify or you can Embed a Twitter feed in your online store
Go to your Twitter settings.
Click Widgets to open the widgets menu.
Create a new widget, following Twitter's instructions.
Copy the embed code.

API to post on Tumblr

I've been trying to upload an image to Tumblr from my iOS application for a little while now, but I can't get my method to work properly.
My current method uses ASIHTTPRequest and OAuthConsumer according to this guide.
However, I end up getting a 401 error (Authentication needed).
You can find the explanation for my problem here.
But my question is : Is there any other mean/API to post on Tumblr for iOS?
I saw that OAuthConsumer was not fully functional on that side, and I didn't find anything with the GTM.
Thanks.
Finally found a solution to my problem a few time ago.
I first thought that it was a bit old and that it wouldn't work but in the end, implementing the TumblrUploadr did the thing.
To sum it all, I achieved login with GTM-OAuth and uploading with TumblrUploadr. For those who seek a solution to the Tumblr API.
Update : Some info concerning GTMOAuth, if you want to use the callback, you have to add a flag in the GTMOAuthAuthentication.m > +(NSArray*)tokenAuthorizeKeys : add kOAuthCallbackKey in the array so that it will be taken into account. Else, you have no callback.

Is it possible to tag a user/page through Facebook open graph api?

I found this post on SO as well as some other links on the web but they all seem outdated and seem to indicate that FB has not yet exposed this through the Open Graph API and i couldnt find anything to the contrary on the web. I am trying to find a way to post an image to a users wall and be able to tag multiple users in the post title or caption?
Is there still no way to do this through the api or somehow achieve the same result?
Tagging user/page in photo caption
This is not possible through the Graph API, and as far as I know the old #[user_id:0:link_text] is currently unavailable. Sadly I'm going to say that it is not possible at the time of writing this post.
I'll update this post with relevant info if I come across any.
Tagging user/page in Photo
This is possible through the Graph API.
The documentation for how to accomplish what you are looking for is located under the headline "tags" if you follow the link below:
developers.facebook.com - Core Concepts › Graph API › Photo

Update Facebook Page Wall via API [duplicate]

This question already has answers here:
Easy way of posting on Facebook page (not a profile but a fanpage)
(2 answers)
Closed 2 years ago.
I am having difficulty both publishing content to a Facebook Page wall, and also finding up to date documentation about how to accomplish this (the Facebook pages that I have found links to in other questions asked here either are missing or broken).
The application I am writing would periodically push content on a schedule basis from a ruby on rails application via a cron job/rake task to the fan page wall. I am hoping that someone may have an up to date guide or instructions on how to push content to Facebook page walls.
Any help would be appreciated.
Koala rocks my world!
Assuming you have asked for write permission to their wall (first read this: http://developers.facebook.com/docs/authentication/ [pay attention to the 'scope' parameter] refer to this for the permissions: http://developers.facebook.com/docs/authentication/permissions/ [you'll need to ask for publish_stream permisson], then read https://github.com/arsduo/koala/wiki/OAuth), and have a valid oauth token, its as simple as:
#graph.put_wall_post("hey, i'm learning koala")
https://github.com/arsduo/koala/wiki/Graph-API
Also, read https://github.com/arsduo/koala/wiki/Koala-on-Rails for Koala on ROR.
See the oauth examples at:http://oauth.twoalex.com/ (Source code: https://github.com/arsduo/oauth_playground)

Resources