Rss Reader (aggregator) based on google reader - c#

I have created an RSS reader (web-app), with usual stuff read rss in xml format parse and display it to user. Every thing is working fine.
Now I want 'my reader app' to use google-reader account as back end, my work flow goes like this
Ask user to log into google account (through pop window).
Google ask user-Id password and after login it says " 'xyz' app want to access you acount 'Allow' 'Deny'"
After allow, access google reader account and get list of subscriptions
If user reads a feed tell google reader (may be thru web API), this item has been read
I just dont know how to accomplish this part. I have tried googling and have read many posts/blog but nothing worked i dont know from where to start.
Please help, Thanks

As you can read in this blog post from Martin Doms, you should be able to get a session token using an HttpWebRequest object with an URL like:
https://www.google.com/accounts/ClientLogin?service=reader&Email=me#gmail.com&Passwd=pass
The whole blog (the article is composed of 3 parts) is worth reading to have a complete overview of the approach.
You can also read about the Google Reader API on this site.

Related

Issue with Twitter API possibly Tweetinvi (Forbidden)

I've been trying for days on this and think that the issue is somewhere with my developer account but thought I'd ask for advice here first before digging in there.
I have followed the documentation and multiple tutorials and this should work it seems but no matter what call I make using Tweetinvi to Twitter I get "Forbidden" which when looking at the twitter codes means my authorization is correct but that I am asking for something that I don't have access to, but I am just trying to send a test tweet to see if the program works, which according to Twitter's documentation I should have full access to. Here's the code that I took from Tweetinvi's Tutorial on how to make a "Hello World" tweet but it just doesn't work cuz it returns "Forbidden".
static async Task Main(string[] args)
{
var userClient = new TwitterClient("APIKey", "sAPIKey", "AccessToken", "sAccessToken");
var tweet = await userClient.Tweets.PublishTweetAsync("This is a test tweet");
Console.WriteLine(tweet);
}
It's not just the send tweet function either, if I try to pull any information at all it says it's forbidden so I feel the issue is on Twitter side not my code but I am just trying to learn it as a hobby and have no idea. Just was told Tweetinvi would make everything take 5 minutes and now I am at three days of trying to figure this out. Any help in figuring this out would be nice and greatly appreciated.
Twitter's latest API release [Nov 15th 2021] has an entry level of access called "Essential" that provides access to the v2 API, because this should be the base for most new apps. If you need access to v2 and also to the legacy v1.1 APIs in the same app, you will need "Elevated" access, which is also available for free. The PublishTweetAsync method you are calling in the code in this question is trying to hit the v1.1 Tweet statuses/update endpoint, so your app will need Elevated access in order to make it work.

Integration of Ogone payments with alias support

I have problems with Ogone Payment provider.
My task is to integrate this payment method, but with alias support, not with credit card number support.
I have searched several times for samples and solutions, also in the Ogone support documentation, but withoud success.
Example1Example2Example3
My question is: Is there a webservice or open web api for making request to Ogone? Did anyone have found samples for this provider writen in C#?
I have found answert of my question.
There are the steps for simple Ogone Payment.
Download Ogone Direct Link Guide from here.
Download Ogone Alias Manager Integration Guide from here.
Try to read them, because all of the info are inside of them.
Find the URL to make request to. Ex: https://secure.ogone.com/ncol/test/orderstandard.asp
Post data to the url like in this example.
The data should include several important components and must be similar to this:
"PSPID=username&
ALIASUSAGE=Test&
ORDERID=OrderId&
AMOUNT=Price*10&
CURRENCY=EUR&
ALIAS=GUID&
LANGUAGE=en_EN&
ACCEPTURL=SomeUrl&
EXCEPTIONURL=SomeUrl&
DECLINEURL=SomeUrl&
SHASIGN=SHA1EncriptedPhrase"
The SHASIGN is encripted passphrase that is taken from the OgoneBackoffice.
If response successd, then you should recieve an Html page.
Put the reponse into an IFRAME or where you want. This is the page for payment.
If there are some issues, please read the Direct Link Guide for them.
After successful payment the user will be redirected to the links in the request.
For More question, please comment.

Get all of the videos and activities from a Youtube user

I'm trying to get all of the videos uploaded by a Youtube user, the Uri I used is this one : https://gdata.youtube.com/feeds/api/users/userId/uploads, which I've got from this link.
The same goes with the user activities it seems I can't get all of the user activities using the Uri described in the same website.
So anyone has any idea how to get all of the user's uploads and activities?
There are 7 (in words: seven) samples of how to get the uploaded videos with the new awesome v3 Api here:
https://developers.google.com/youtube/v3/code_samples/
It should be easy to look at one and convert it into the language of your desire.
With this tool you can test all the variations of input to find out how to get all videos:
https://developers.google.com/youtube/v3/docs/playlistItems/list#try-it
(Spoiler: Default settings)
You can get the PlaylistID that contains all uploads by fetching the channel Informations:
https://developers.google.com/youtube/v3/docs/channels/list#try-it
I recommend that you take a look at the V3 API and good luck!

How to use Yahoo REST Api in C#

I'm just trying to make an yahoo boot that send to registered user of my application an instant message. I've spent some hours searching the web on how to do it but yahoo developer documentation sucks.First of all I don't know what servers I should use for authorization, log in, and messaging. I have a consumer key and I've tried to follow this steps but nothing works.
Any advice/suggestion is welcome.
The documentation looks to be very good, I think the issue here is that your knowledge of how REST API's work in general is a bit lacking.
Let's talk about diagram #2: Get a request token using: get_request_token.
get_request_token is part of an HTTP endpoint, and in their diagram they want you to pass in a handful of parameters to validate your request.
oauth_consumer_key
oauth_nonce
oauth_signature_method
etc
(If you need more clarification of any step you can find it in the tree view on the left hand side of the page)
The request URL:
https://api.login.yahoo.com/oauth/v2/get_request_token.
Now at this point you can either use the HTTP GET or POST verb. If you decide to use GET you will need to include those above parameters as a query string.
?oath_consumer_key=myConsumerKey&oauth_nonce=oathNonce etc
I will leave it to you to write the associated C# code. You'll want to start off with the HttpWebRequest.Create() method

Get Tweets of all users using TweetSharpAPI

I have implemented a method which manually scrapes the Search Twitter page and gets the tweets on different pages.
But since there is a fast refresh rate, the method triggers an exception.
Therefore I have decided to use TweetSharp API instead
var search = FluentTwitter.CreateRequest()
.AuthenticateAs(TWITTER_USERNAME, TWITTER_PASSWORD)
.Users()
.SearchFor("dumbledore");
var result = search.Request();
var users = result.AsUsers();
this code was on the site.
Does anyone know how I can avoid giving my credentials and retrieve from all users and not just the ones I have as friends?
Thanks!
What you want to do is interface with the Twitter Streaming API. This API allows you to open a persistent connection with Twitter and Twitter will then stream results to you as they come in.
(taken from the Twitter Streaming API page)
That said, TweetSharp doesn't currently support the Streaming API. However, it's not difficult to open a connection to Twitter in .NET and process the responses as they're received (however, I'd recommend using the HttpClient class to process this asynchronously, as well as using a proper JSON parsing library, like Json.NET).
Note the third column in the diagram "Streaming connection process", specifically the middle part:
Receives streamed Tweets, performs processing and stores result
As well as the "HTTP Server process" column:
Server pulls processed result from data store and renders view.
While not explicitly mentioned, you are best off just persisting the Tweet as you get it into a data store and then having another process handle the Tweets; the volume of Tweets you might get is so high that performing any processing when you get the Tweet will backlog the receiving of new Tweets.
For your specific case, you'll want to access the Public Streams with a POST filter of "dumbledore".

Categories