Labels

Showing posts with label Assistments. Show all posts
Showing posts with label Assistments. Show all posts

Thursday, November 3, 2011

Associating facebook and ASM accounts

Here's how it's done:

http://developers.facebook.com/docs/plugins/registration/
This pops up an iframe that has in it a form prefilled with your facebook data. It also supports custom fields. You can fill out or change any fields you want to and then submit the form as a signed request to the server.

If a user only has a Facebook account, they can just register with this to create an associated ASM account.

When an ASM account is already logged in, we should be able to use the same form with different parameters to associate the two accounts.

Edit: Code is here: http://pkinsky.com/register.html

Share pages with friends

 Like shares with all, send allows you to choose recipients from among your friends.

http://www.pkinsky.com/askhelp.html

Sunday, October 30, 2011

API progress

As of now, I've made a test api call that gets a database object, saves data to it, and then reads other data from it. I've also managed to create 'watcher' database objects via API and retrieve data from them (a callback url) elsewhere.

The next step is to send a POST request to that callback_url when the relevant event happens. This can be expanded to cover assignments being added, achievements, etc.

EDIT: and then I uploaded the code - my api call is test_call in lib/gwt/ajax.rb

EDIT2: now featuring working post/response of JSON data to and from an external php script! Proof of concept finished, time to start on the actual product.

Wednesday, October 26, 2011

Monday, October 3, 2011

PHP and JS Guidlines for FB: Acronyms!

I've put together a guide on the php and javascript sdks for facebook. It mostly consists of links to facebook's own documentation, which is amazing. This needs to be cleaned up, but these links show examples on pretty much every part of facebook's api.


php:
login/out and requesting permissions, posting to a user’s wall, getting a user’s information all with graph api, newest api http://developers.facebook.com/docs/reference/php/facebook-api/
methods for login/logout http://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/ http://developers.facebook.com/docs/reference/php/facebook-getLogoutUrl/
what to show depends on result of http://developers.facebook.com/docs/reference/php/facebook-getUser/
You should also authorize your app using the values from you facebook developer app page http://developers.facebook.com/docs/reference/php/facebook-setAppId/ http://developers.facebook.com/docs/reference/php/facebook-setAppSecret/
i dont see it in the docs explicitly but in the examples this method is used to init facebook object:
$config = array( 'appId' => 'YOUR_APP_ID', 'secret' => 'YOUR_APP_SECRET', );
$facebook = new Facebook($config);
javascript
info, how to load sdk http://developers.facebook.com/docs/reference/javascript/
FB.login() -- login and/or request extended permissions FB.logout() -- logout (only if the user is connected with your application) FB.getLoginStatus() -- get current login status from facebook.com FB.getSession() -- synchronous accessor for the current session. Note that in OAuth 2.0, this function will no longer function and you should use FB.getAuthResponse(). FB.getAuthResponse() -- accessor for the current authorization response record, which for connected users includes an access token, a signed request, and a user ID.
api calls: http://developers.facebook.com/docs/reference/javascript/FB.api/
can trigger dialogs with ui methods http://developers.facebook.com/docs/reference/javascript/FB.ui/
lots of useful methods - can control position, size, etc for canvas page, login/out, etc
you can make calls in facebook query language to get info http://developers.facebook.com/docs/reference/fql/

Tuesday, September 27, 2011

Project Outline

In the past few years there has been an industry-wide trend towards Facebook integration. It can even be seen on WPI’s JobFinder website. Essentially, the goal is to let users of your website engage with it through facebook. Apps can deliver alerts and news stories to users. Facebook also provides access to many other core features via API. Some examples are sending requests, awarding achievements, and creating events. It also gives apps their own page on Facebook’s site, where they can fill a ‘canvas’ which covers most of the page with anything they want.
We plan to build a facebook application that will accomplish these functions:
    1. handle authentication:
      1. Our application will allow users to associate their Facebook account with their Assistments account using the OAUTH 2.0 protocol.
      2. It will also request any necessary permissions from the user.
    2. manage notifications
      1. When an event, such as a problem set being assigned, occurs, the application will generate a notification of some type.
      2. When a user arrives at our app via a notification, we can redirect the user to the relevant page.
    3. It will also provide the infrastructure necessary to integrate Assistments further with facebook. For example, awarding achievements to users will be as simple as a single post request.

This will be beneficial to students using Assistments because many younger children use facebook. With our application, assistments will be immediately visible to students in a place they already go. We hope that if we increase the convenience of using assistments, students will be more likely to do their assignments.

Monday, September 26, 2011

Issues with ROR and FB

I've been having a lot of trouble getting rails to work with facebook. They only support PHP and javascript SDKs, so I'm going to try using a ruby gem I found that integrates javascript and rails.

https://github.com/cowboyd/therubyracer

Sunday, September 18, 2011

Progress with Facebook API

I've been tinkering with the facebook API. So far, I have working versions of:
  1. Users can login and logout through my page.
  2. Send requests from my app to registered users. Once issued they can be:
    1. updated with new info ("DUE IN 2 HOURS!" or "3 out of 5 questions completed")
    2. read ("A good common practice for Apps on Facebook.com is to detect if a user has any requests pending when your application loads and then prompt the user to complete the actions associated with the requests before continuing.")
    3. deleted (clear request when associated problem set is completed)
  3. Register achievements that can then be awarded to users. They can then be:
    1. read
    2. deleted
  4. Award users scores for the app. They can then be:
    1. read
    2. deleted
This is all PHP implementations of html POST requests. It will be easy to transfer to ROR once we get our version of ASSISTments running
 
Also, Screenshots!
Achievements and scores. It also autogenerates notifications about how you have x of y achievements for an app, or the highest score.
 
 
 
 
 
 
 
 
 
 
 
 
Requests from an app to a user: These show up in a few different places, including the main page.
(I left the default text in)

Tuesday, September 13, 2011

Assisments Facebook App Users

The potential users for our Facebook app fall into three groups:. Here's some examples of how each group could use our app.
  1. students:
    1. The student logs onto facebook and sees a private notification through one or more of Facebook's notification systems. Notification examples:
      1. New assignment
      2. Assignment grade available
    2. The student logs onto Facebook and completes a problem set through the Assistments app
  2. teachers
    1. unknown
  3. parents
    1. get notifications about their students grades and assignments
We recently got the results from a survey given to the parents of children using Assistments. We haven't been able to go through all of them, but there is some interest in getting notifications through Facebook.



    Assistments ISP First Post

    Hi! My name is Paul Kinsky. I'm a Computer Science major at Worcester Polytechnic Institute, WPI.

    I'm working on a project for several professors at integrate a to extend a piece of educational software called Assistments with social media. Right now we're working on a facebook app that would allow students to complete problem sets within facebook.

    We've been granted access to the source code today, by the end of the week we hope to have a working prototype. I'll be posting details as we go.