Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
StockService
Facebook Service
============

Get the latest information about stocks.
Get your latest Facebook posts.
8 changes: 8 additions & 0 deletions java/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="libs/StickyWeb-doc-2.5.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions java/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
44 changes: 44 additions & 0 deletions java/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
/bin/
Expand Down
17 changes: 17 additions & 0 deletions java/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>FacebookService</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
79 changes: 79 additions & 0 deletions java/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0"?>
<project name="Build Facebook Service" basedir="." default="dist">
<description>
A build file to generate a distributable .jar for the RealTimeWeb Facebook Service.
</description>

<property name="src" location="src"/>
<property name="bin" location="bin"/>
<property name="dist" location="dist"/>
<property name="docs" location="docs"/>
<property name="ver" value="1"/>
<!-- <propertyfile file=".properties">
<entry key="docs" value="docs/" />
</propertyfile>-->

<path id="classpath">
<fileset dir="libs" includes="**/*.jar" />
</path>

<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${bin}"/>
<!-- Create the doc directory structure used by compile -->
<mkdir dir="${docs}"/>
</target>

<target name="compile" depends="init" description="Compile the source" >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${bin}" classpathref="classpath"/>
<!-- Copy all the non-.java files to ${build} -->
<copy todir="bin">
<fileset dir="src" excludes="**/*.java" />
</copy>
<!-- Compile Javadoc -->
<javadoc
use='true' author='true' version='true'
overview='index.html'
access='package'
sourcepath='src'
packagenames='*.*'
destdir='${docs}'
windowtitle='Facebook Service: version ${ver}'
noqualifier='java.*:javax.*:com.sun.*'
linksource='true'
/>
</target>

<target name="dist" depends="compile" description="Generate the Distribution files" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>

<!-- Put everything in ${build} into the facebookservice-${DSTAMP}.jar file -->
<jar jarfile="${dist}/facebookservice-${ver}.jar" basedir="${bin}">
<fileset dir="bin" includes="bin/*.class" />
<zipgroupfileset dir="libs/" includes="*.jar" />
</jar>

<!-- Put everything in ${build} and ${docs} into the facebookservice-doc-${DSTAMP}.jar file -->
<jar jarfile="${dist}/facebookservice-doc-${ver}.jar" basedir="${bin}">
<fileset dir="bin" includes="bin/*.class" />
<fileset dir="docs" includes="**" />
<zipgroupfileset dir="libs/" includes="*.jar" />
</jar>

<!-- Put everything in ${build} and ${src} into the facebookservice-src-${DSTAMP}.jar file -->
<jar jarfile="${dist}/facebookservice-src-${ver}.jar" basedir="${bin}">
<fileset dir="bin" includes="bin/*.class" />
<fileset dir="src" includes="**" />
<zipgroupfileset dir="libs/" includes="*.jar" />
</jar>
</target>


<target name="clean" description="Clean up the files" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${bin}"/>
<delete dir="${dist}"/>
</target>
</project>
1 change: 1 addition & 0 deletions java/cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"metadata":{},"data":{}}
176 changes: 176 additions & 0 deletions java/facebook_spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{
"metadata": {
"name": "Facebook Service",
"description": "Online Social Network",
"version": 1,
"author": "Peeratham Techapalokul",
"contact": "tpeera4@vt.edu"
},
"objects": {
"Post": {
"description": "An individual entry in a profile's feed.",
"format": "json",
"comment": "https://developers.facebook.com/docs/graph-api/reference/v2.2/post",
"fields": {
"id": {
"type": "string",
"path": "id",
"description": "The post ID",
"order": 0
},
"from": {
"type": "User",
"path": "from",
"description": "Information about the user that posted the message.",
"order": 1
},
"to": {
"type": "User[]",
"path": "to.data",
"description": "Users mentioned or targeted in this post.",
"order": 2
},
"message": {
"type": "string",
"path": "message",
"description": "The main body of the post, otherwise called the status message.",
"order": 3
},
"picture": {
"type": "string",
"path": "picture",
"description": "The picture scraped from any link included with the post.",
"order": 4
},
"link": {
"type": "string",
"path": "link",
"description": "The link attached to this post.",
"order": 5
},
"video": {
"type": "string",
"path": "source",
"description": "A URL to any Flash movie or video file attached to the post.",
"order": 6
},
"name": {
"type": "string",
"path": "name",
"description": "The name of the link.",
"order": 7
},
"description": {
"type": "string",
"path": "description",
"description": "A description of a link in the post (appears beneath the caption).",
"order": 8
},
"type": {
"type": "string",
"path": "type",
"description": "A string indicating the object type of this post.",
"order": 9
},
"createdTime": {
"type": "string",
"path": "type",
"description": "The time the post was initially published.",
"order": 10
},
"updatedTime": {
"type": "string",
"path": "updated_time",
"description": "The time of the last change to this post, or the comments on it.",
"order": 11
},
"likes": {
"type": "User[]",
"path": "likes.data",
"description": "People who like this post.",
"order": 12
},
"comments": {
"type": "Comment[]",
"path": "comments.data",
"description": "Comments on this post.",
"order": 13
}
}
},
"User": {
"description": "A user represents a person on Facebook.",
"comment": "https://developers.facebook.com/docs/graph-api/reference/v2.2/user",
"format": "json",
"fields": {
"id": {
"type": "string",
"path": "id",
"description": "The id of this person's user account.",
"order": 0
},
"name": {
"type": "string",
"path": "name",
"description": "The person's full name",
"order": 1
}
}
},
"Comment": {
"description": "A comment to a post.",
"comment": "https://developers.facebook.com/docs/graph-api/reference/v2.2/comment",
"format": "json",
"fields": {
"id": {
"type": "string",
"path": "id",
"description": "The comment ID",
"order": 0
},
"from": {
"type": "User",
"path": "from",
"description": "The person that made this comment",
"order": 1
},
"message": {
"type": "string",
"path": "message",
"description": "The comment text",
"order": 2
}
}
}
},
"functions": {
"get feed": {
"url": "https://graph.facebook.com/v1.0/me?fields=feed.limit(<limit>)&access_token=<access_token>",
"verb": "get",
"description": "The feed of posts (including status updates) and links published by this person, or by others on this person's profile.",
"comment": "https://developers.facebook.com/docs/graph-api/reference/v2.2/user/feed",
"output": "Post[]",
"format": "json",
"post": "feed.data",
"inputs": {
"limit": {
"path": "limit",
"type": "integer",
"description": "Specify how many posts will be retrieved",
"hidden": false,
"indexable": true,
"order": 0
},
"access token": {
"path": "access_token",
"type": "string",
"comment": "A user access token with read_stream permission is required.",
"description": "The user's access token. Need Extended Permission: read_stream",
"hidden": false,
"indexable": true,
"order": 1
}
}
}
}
}
Binary file added java/libs/StickyWeb-doc-2.5.jar
Binary file not shown.
Loading