I have been studying RESTful web services for a while. My question is, despite how great it is, should every part of the website use RESTful style?
For example, yes I can create a User by POST->/user. If my website is similar to Twitter that after registration, users will be guided to a page to initiate their choice of broadcasts (kind of like on Twitter, you follow people). How do you name this initialization using RESTful style? Very difficult!
So is RESTful style for APIs only? Or should it be used throughout the site?
Related
I am not talking about the public graph api, i am asking is it technically possible to consume facebook's private api that facebook official apps use, and benifit from login/sign up and such features?
Like if i reverse engineered messenger or facebook app and mimic their communication with their API, whould i be able to build a working client?
Thank you.
There are existing projects that have already done the same.
Take a look at the works of dequis e.g. purple-facebook. He has also written tutorials on reverse-engineering the APIs of Facebook Messenger and WhatsApp.
Take a look at the source code of the Facebook protocol plugin of Miranda NG. They reverse-engineered the API used by the desktop web frontend of Facebook.
They exist for years. None of them have been sued so far. However, hiding your identity is recommended if you plan to do such things. Also you may want to open-source your project and host it on multiple sites. Corporate arrogance of tech companies is at very high levels nowadays.
Yes, it is theoretically possible.
However, remember that you will be easily sued if Facebook do not agree with what you're trying to do. For example, if you're trying to use their own private Intellectual Property without their permission, or if you violate their Terms of Service agreements (reverse-engineering is going to be in there without a doubt), then they can legally sue.
Facebook have public APIs with documentation which is what is intended to be used by developers. If you decide to ignore it and go digging into things which you do not own, nor have consent to access, you're going to land yourself into trouble.
I don't mean to be a kill-joy, I'm just saying how it is from a realistic point-of-view.
I created an application as part of a university project that searches using web APIs. Google+ is one of the APIs considered.
Now I am trying to evaluate this application against what other search tools offer. In the evaluation, I ask the user to create a google plus account and then try to find it using the search engine example.com and then try our tool.
The problem I am having is that when I create a google plus profile, I can not find it immediately using "Google+ API people search". Is there a way to tell the API to consider recently created profiles or any other solution to this.
No. Google+ is a large application and things can take time to process by various other systems.
I am implementing REST APIs using Flask Restful and want to add session based auth for users. Currently I am NOT implementing a web app. I am wondering if the Flask-Login extension can only be used for web apps or can I use them for my REST application too?
Altough a RESTful service should be stateless by definition,
I would avoid that one. It's more "form-oriented".
Go for OAuth2, it's the de facto standard for RESTful web services.
A good implementation is Flask-OAuthlib, available on GitHub.
Currently we are developing social network, which includes apps inside, for example Games. There is no public API for developers to make their apps, instead Apps developed ourself.
Our platform is based on Zend Framework. Also we have XMPP protocol implementation (clientside-strophe, serverside-java) for chat, notifications and for other pushing tasks. XMPP will be used in apps.
We want to separate apps from social network code, so we can keep it simple, lightweight.
What strategy you can suggest for such separation? Our desire is to keep architecture and code simple and clean.
Since this is an architectural question, I'm sure there are many way of doing what you need. Here is my 2 cents. Keep your apps server completely separated from the social media server. Use client side JS scripts to embed and render the apps on your social media site.
Think it like this: You know Facebook social plugins that allow embedding Facebook components in external sites. Below is a screenshot of Facebook LikeBox embedded in a completely separate DNN portal.
In your scenario, assume DNN as your social media site. And the LikeBox as your app. Architecturally they are well separated, even can be served from different severs. But integration happens on the client side.
If you need these apps to interact with the social media site, either you can do it via a REST API. Or you can use DOM events or simple JS function calls.
Few days ago I wrote a blog post on a similar architecture and can be found at: http://blog.hasith.net/2012/06/traditional-portals-are-dead-long-live.html
3rd party apps like facebook app are standalone application which access facebook DATA .
So make your social network data available through your API on internet, implement Zend_OAuth for authentication HMAC after that you can freeze your social network code .
Now you can create your web application in Javascript/Flash which access your social network data through your API .
I want to configure a simple webapplication to support an iphone app to connect with it in RESTFUL ways. Initially have a user login session enabled from the iphone to the web app. I'd like the iphone app to send a NSURL call to the webapp, with user and password and have the webapp respond if the suer exists or not. Pretty simple. And I want to do it with web2py. Is this possible? Any clues?
I think you should post it to web2py group on google groups.
web2py#googlegroups.com
I know this question is a bit old now, but Massimo recently posted a video demonstrating a new experimental RESTful API for web2py. See also the Google groups posting "video about new RESTful APIs" .