Facebook Credits/Payment API in C# or VB .net? - c#

I can't seem to find any code examples anywhere online that even hint at any way to use the Facebook API or Facebook SDK with C#.net (or even VB.net) to use the Facebook Credits features.
Does anyone know of any .Net examples that could help show how to use the Facebook Credits features?

Most of the calls required to use the credits API are actually just graph calls which will work fine with the C# SDK. The other stuff like the the callbacks you are going to have to do own your own.

Well i think the Documentation by Facebook is Sufficient enough.
I have not used Facebook C# SDK but For use in .Net you can simply use HttpRequest/HttpResponse classes to do Send/Recive data.
For parsing JSON you can use JSON.Net or use JavaScriptSerializer Class.
Here is an Example with JavaScriptSerializer. Its for Facebook Feeds but you can use somthing similar for Credits too.

I see this is an old one, i'd like to contribute, having just fought this fight, and resorted to using network monitor to capture the raw tcp traffic to figure out what was going on.
Facebook is NOT sending a content-type of json, its
"ContentType: application/x-www-form-urlencoded"
They aren't sending JSON!! they are sending a form post
This caused no end of grief for me. I'm including an actual network snag of their data. I have no idea what they are doing , and its directly against their documentation. https://developers.facebook.com/docs/credits/callback/
"signed_request=[The signed request]&buyer=[my id]&receiver=[my id]&order_id=247146405372045&order_info=%22100credits%22&test_mode=1&method=payments_get_items"
TO tie it more directly to the question, if you're using asp.net, you can just accept a form post. If you using WCF, its a hassle
Accept Stream as the input to your WCF method
parse it out,
//Get the Stream
var postStream = new StreamReader(input).ReadToEnd();
//parse the string
var vals = HttpUtility.ParseQueryString(postStream);

Related

Using agsXMPP , can it send images?

I found this lib here
http://www.ag-software.de/agsxmpp-sdk/
hacked on this example here:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=346
It works pretty well actually but I am wondering if one could rig up a message thats an image that would show up in the others (google talk client) or some other client for display? I poked around on the web, couldn't figure out definitively if this is possible...their site says the api supports XML-RPC, could that do it?
Just want to know im not going down a dead end for this functionality...if XMPP jabber even supports it.
This library seems not to support XEP 0231, the specification that "defines an XMPP protocol extension for including or referring to small bits of binary data in an XML stanza."

Google alerts api for .net

I'm trying to build an application in .net, and using google alerts (the feeds part).
Right now i am searching for API, or some way to interact with google alerts, but no results so far.
It will be very good if anyone can provide me with that google alerts API.
OR
A way to interact with it.
Thanks in advance,
-Sea
If you set up your alert set the delivery method to feed, this will create a standard RSS feed which you can consume using an XmlTextReader or XmlDocument
There is a .net implementation of an api for google alerts here: http://coders11.com/googlealertsapi
I've used this before and its easy to use and works great
http://frickingnutz.com/?q=node/51
There is Google Alert API for C#:
https://github.com/oscar811/GoogleAlertAPI

How do I integrate google search into my C# program?

I'm working on a program in Visual C#.NET and I need some help.
I need it to be able to take in some text through a text box, then somehow send that text to google, and bring back the resulting URLs (not the full results, just the URLs) and then display those in my program. How would I do that?
Use the WebClient class to send the query to Google and read the response.
Alternatively, use a .NET library that interacts with the Google search API, like this one (this was just the first Google result).
There are also REST libraries for .NET, if you go with the newer custom search.
Unfortunately the Google Web Search API is deprecated and no longer available. However the next best thing IMO is Google Custom Search Engine.

Source code to retrieve Google Adsense earnings?

Where to find source code to read google adsense account earnings ? any language welcome especially c#, php.
Update: I still don't have any source code until now that seem to work.
Unfortunately all of the other answers are using either deprecated API or are linking to 404 pages.
Google did release a new management API for AdSense which is well documented:
https://developers.google.com/adsense/management/
Documentation is here It's a very in-depth webservice that allows you not only to get access to reporting, but also create, modify, etc campaigns.
This is an interesting low-tech approach. It's featured on the CURL website. Could be re purposed for your application.
You could use this php library http://code.google.com/p/php-adsense-account-library/

Is there any way I can use google-image serach API?

I want to retrive search results from google images from my .net application. Is there any way out there?
Yes, there is.
The Google Image Search API offers access through a RESTful interface, as described here, on the API reference page.
You can use e.g. the WebRequest class to make the API calls, and use one of the JSON libraries as listed on this page, such as Json.NET or JSONSharp to parse the returned JSON data.

Categories