OAuth, REST, and JAVA???

297 views
Skip to first unread message

Dan

unread,
Feb 21, 2012, 1:23:49 PM2/21/12
to FatSecret Platform API
Hi, I'm developing an app for a class I'm taking and have some
questions.

It seems that OAuth is used primarily with web apps however I've been
tasked with developing in JAVA. Is using OAuth and the FatSecret REST
API a viable possibility? Will developing with JAVA even work?

Also, I've not seen many 'guides' or 'tutorials' regarding using OAuth
with JAVA, are there any that anyone knows of???

Thanks all,

-Dan

John Freeman

unread,
Feb 21, 2012, 3:56:38 PM2/21/12
to fatsecret-p...@googlegroups.com
On 2/21/12 12:23 PM, Dan wrote:
> It seems that OAuth is used primarily with web apps however I've been
> tasked with developing in JAVA. Is using OAuth and the FatSecret REST
> API a viable possibility? Will developing with JAVA even work?

Yes.

OAuth has official implementations in several languages, Java being one:

http://code.google.com/p/oauth/

Further, FatSecret publishes a Java library for use with their REST API
(note: I have not looked at it):

http://platform.fatsecret.com/api/Default.aspx?screen=res


> Also, I've not seen many 'guides' or 'tutorials' regarding using OAuth
> with JAVA, are there any that anyone knows of???

Take a look at their examples:

http://oauth.googlecode.com/svn/code/java/example/


Hope that helps,
John

Dan

unread,
Feb 21, 2012, 4:29:34 PM2/21/12
to FatSecret Platform API
Hi John!

Thank you for your prompt reply!

> Further, FatSecret publishes a Java library for use with their REST API
> (note: I have not looked at it):

I have looked at the API for java, but the examples are in
JSP...something I'm not familiar with nor have a need to work with.

Essentially I need something that will work within an IDE (eclipse in
my case) for use with an Android Application - imported libraries from
which I can call methods. I'm still not sure if this is a
possibility. I've tried using import statements to no avail. Is
there perhaps a package I need to download in order to use the method
calls?

Thanks again for any help!

-Dan

John Freeman

unread,
Feb 21, 2012, 5:27:32 PM2/21/12
to fatsecret-p...@googlegroups.com, Dan
On 2/21/12 3:29 PM, Dan wrote:
> Is
> there perhaps a package I need to download in order to use the method
> calls?

I'm sorry, I don't have enough experience with Java, Eclipse, or the
Java OAuth library to help you. I recommend trying to build the
documentation and giving it a look:

http://code.google.com/p/oauth/source/browse/#svn%2Fcode%2Fjava

Good luck!

- John

Dan

unread,
Feb 21, 2012, 5:57:15 PM2/21/12
to FatSecret Platform API
Thanks for your help.

If anyone else out there knows how to pull the required FatSecret
libraries into eclipse, please pass that information on.

Otherwise, is there any other way to start developing using the
FatSecret REST API with Java?

Any examples would be great.

-Dan

Suzanne Hornbuckle

unread,
Feb 21, 2012, 7:59:20 PM2/21/12
to fatsecret-p...@googlegroups.com
i dont know.


--
You received this message because you are subscribed to the Google Groups "FatSecret Platform API" group.
To post to this group, send email to fatsecret-p...@googlegroups.com.
To unsubscribe from this group, send email to fatsecret-platfor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fatsecret-platform-api?hl=en.


Emma

unread,
Feb 23, 2012, 8:14:02 AM2/23/12
to FatSecret Platform API
Hi Dan,

I have run into a similar issue, Have you found any information of
using the library with eclipse?
It sounds like you are doing a project very similar to mine :)

Emma Fly

Dan

unread,
Feb 23, 2012, 6:35:16 PM2/23/12
to FatSecret Platform API
Actually there is a jar file available here:
http://platform.fatsecret.com/api/static/libraries/java.tar.gz

You will find the jar file in this directory: \java.tar.gz\java.tar
\SampleProject.war\WEB-INF\lib\FatSecretAPI.jar

From there you just need to import the file into your ide. I haven't
spent too much time with it. All I know is that I will be rewriting
pretty much all of it because as it stands now, it's pretty unusable.
As I spend time with it this weekend I'll post back here and let you
know.

-Dan

Dan

unread,
Mar 7, 2012, 5:07:44 PM3/7/12
to FatSecret Platform API
Ok. So could someone please spell out to me how (in what format) the
call to the api needs to be?

I just want to test out if I can even see a response from the server.
So far I've received nothing but errors.

-Dan Cleereman
Reply all
Reply to author
Forward
0 new messages