Retrieve user tweets in windows store app - c#

How can I retrieve all tweets for specific twitter user "#username" in windows store apps?

I would probably consider using an HttpWebRequest to make a call to the Twitter API.

There are a few Tweeter Wrapper around,
Checkout this wrapper : https://github.com/danielcrenna/tweetsharp
TweetSharp is a Twitter API library that greatly simplifies the task
of adding Twitter to your desktop, web, and mobile applications. You
can build simple widgets, or complex application suites using
TweetSharp. The second version, a rewrite, was designed to be lighter,
faster, and more intuitive than the original. You write fewer lines of
code, make fewer decisions, and get better results. Visual Studio T4
templates are employed to automatically generate new API methods from
a simple text-based DSL.

I posted a tutorial about that a couple of days ago. Take a look:
http://www.codeproject.com/Articles/599505/Databind-Twitter-XML-Feed-in-Windows-8
Should explain it :)

Related

How to integrate xAPI / TinCan in Unity

I am new to xAPI/TinCan API so my question might be a bit general but I haven't found anything that can help me so far.
I figured it is possible to integrate xAPI into a Unity project (a game or simulation) but how exactly do I do that? (Are there any examples/documentation I can read on xAPI & Unity?)
So am I right to understand: I need a LRS, then I can use the TinCan .NET library and integrate it in Unity and then just have some conditions in my Unity code (like finish that level..) and if they are fulfilled I create a statement like in the example here (http://rusticisoftware.github.io/TinCan.NET/) and then send it to my LRS via a normal POST? And then I can see/query this learning data in my LRS for analytics?
Plus does it work for Unity standalone, mobile and web player??
An API for integrating xAPI into Unity3D has been released by the GBLxAPI open source community. This was built up from the rustici software c# library with more specific integration to the Unity game engine for collecting data for learning games. You can get access to the API from here https://gblxapi.org/community-blog-xapi-gbl/14-unity-3d-xapi-pilot-getting-started
The documentation is on the GBLxAPI GitHub site in the wiki. https://github.com/gblxapi/UnityGBLxAPI
The community also provides access to a sandbox you can test your integrations in your games to an LRS and BI tool for free as of this writing. There is also a free game demo where you can see xAPI being generated from a game.
This had been successfully integrated to a lot of games including non-learning games for collecting general game analytics using xAPI.
I have little Unity experience (other than researching others' questions on this subject) but for the most part I believe you are correct. TinCan.NET should work with Unity based on what others have said, and it provides everything you need to communicate with the LRS (so no need to do your own POST, etc. instead look at the RemoteLRS class methods).
In general I would avoid querying the LRS directly for analytics reporting, instead consider it a long lived data store that should be used to populate a reporting tool. Having said that, you can certainly see the data in an LRS. You can access a free LRS at https://cloud.scorm.com (from Rustici Software maintainers of TinCan.NET) by signing up for an account.
Note you may run into a common issue with SSL certificate validation and will want to have a look at Mono https webrequest fails with "The authentication or decryption has failed" if you do.
I can't speak to the standalone, mobile, web player question, though I'd expect anything supporting .NET should work.
Here is a simple Unity game example from HT2, a company behind Learning Locker Open Source LRS
https://github.com/HT2-Labs/unity-xapi
It is sending one xAPI statement from Start() at game initialization. I could make it working with Learning Locker and a free https://lrs.adlnet.gov/ (beware, they make your statements public here)
To make this example work:
git clone locally Unity example from github
add it to your local Unity hub
there will be warning about Unity old version of the example, select whatever Unity version you use and confirm version upgrade
open TinCanTest.cs in Visual Studio, change
string endpoint = "https://ORG_NAME.learninglocker.net/data/xAPI";
string user = "KEY";
string password = "SECRET";
to credentials of your LRS and try running the game.
Looks it uses Rustici C#/.NET TinCan library
https://github.com/RusticiSoftware/TinCan.NET
which you can install from NuGet.
As of 2019 there are other free tryout LRS limited editions:
https://cloud.scorm.com/sc/guest/SignUpForm
https://www.yetanalytics.com/xapi
https://www.watershedlrs.com/product/pricing/essentials-learning-record-store
Open Source LRS
https://github.com/LearningLocker/learninglocker
https://github.com/adlnet/ADL_LRS

Sharing opengraph story using FB.Feed

I am trying to figure out how to publish opengraph stories using FB.Feed in Unity3d. We are using the Unity Facebook SDK version 6.2.2.
According to the Facebook docs it is possible to utilize the share dialog to post custom opengraph stories.
https://developers.facebook.com/docs/sharing/opengraph/ios#sharedialog
I know it is possible to post stories with FB.API, but that requires extended permissions from the user, which is not something we want to ask for.
Does anyone have a C# code snippet showing how to use the FB.Feed function to post opengraph stories (including metadata and an image)?
Thanks for your kind help.

Access to Facebook?

As a little learning project, I'd like to make a little app that reads data from a facebook users status updates. It's been done millions of times before, I'm sure, but is there an API or something? Would I need to signup for some Facebook developers license or anything, or is it as easy as finding the API, and then simply coding to it?
I'd like to simply get friends Status Updates via my login... seems easy enough. :)
The Facebook Developer links posted above are good, but it might be useful to look at some examples.
The Facebook C# SDK, found here: http://facebooksdk.codeplex.com/, has samples in ASP.NET MVC. It's a pretty simple project, so it should be relatively easy to see how things work in practice.
You can create an app at http://developers.facebook.com/
Then, download the sample project, replace the AppId and AppSecret with values from your registered app, and see how it works.
You can start reading here: http://developers.facebook.com/docs/
And look in the forum discussions here: http://forum.developers.facebook.net/index.php
This post was helpful to me http://gathadams.com/2007/06/18/how-to-write-a-facebook-application-in-10-minutes/
Also keep in mind this last change made for FB team about Post for canvas http://developers.facebook.com/docs/canvas/post/
Good luck!

How do I tweet, using the DotNetOpenAuth library?

I just downloaded the DotNetOpenAuth library and ran the AuthConsumer demo. It is an excellent library so far! Everything worked as advertised, which has not been my experience with a lot of Facebook and Twitter sample code that I have been working with recently.
What I am trying to figure out is: How do I tweet using this library? I am currently planning to implement this in ASP MVC, but my initial thoughts is that the presentation platform doesn't matter all that much at the level I'm looking at.
Take a look at the DotNetOpenAuth.ApplicationBlock sample, which includes the Twitter.cs file and the very few sample web method calls that that file has. You can see the pattern, and having looked at the Twitter API documentation on twitter.com, you can add methods to tweet and a bunch of other stuff.
However, it would probably be much easier for you to download LinqToTwitter, which uses DotNetOpenAuth and offers an extensive Twitter library to do most/all the operations Twitter supports.

Asp.net webparts or portlet like functionality

What is the best way to let other parties use your website as their own content using their own style ?
We have build a small website for a customer, asp.net, .net framework 3.0. Now the customer wants other parties to be aple to use our website in their own websites while maintaining the styling of the costumers website.
I have done nothing like this before and don't even know what to google, so any help is appriciated.
I know you can do this with sharepoint, but to use sharepoint for such a small site seems like a lot of overkill
it sounds that portlets is a good name for what they want. but googling portlets draws me in the world of java and doesn't give me a lot of info on what the other parties would have to do to make it work.
a simple Iframe would probably take me a long way, but how can you get the styling done within an Iframe
webparts also sound interesting , but they seem more for in project sharing then letting people use them in their own site.
It is a small website and the logic and backend communication is pretty good contained, so a complete rework of the frond-end is not a big problem.
Once again, any help is appreciated !
Omar Al Zabir has a book on how to build a Portal in ASP.NET- here is a link to his Website.
You might want to look at his Dropthings portal.
Yes, portlets are pretty much Java-only, despite any talk of standards.
If you can encapsulate your pages in web parts or user controls, that would make it easy to style them, and even to parameterize them: a web part can be configured.
You can use Kalitte Dynamic Dashboards for creating professional dashboards and portlets.
More information can be found at www.dynamicdashboards.net

Categories