Hi I am trying to run the following query from the Developer Console's Query Editor, but I am getting the error shown below:
SELECT Id, Type, CreatedDate, CreatedBy.name, Body FROM NewsFeed WHERE Type= 'UserStatus' ORDER BY CreatedDate DESC, ID DESC LIMIT 10
I am getting the following error:
sObject type 'NewsFeed' is not supported.
I am actually trying to run the query from a web app using the following (authenticated using oauth2.0):
QueryResult results = connection.query("SELECT Id, Type, Body, Title, CreatedBy.Name FROM NewsFeed ORDER BY CreatedDate DESC, Id DESC LIMIT 20");
However that is giving exception message, that is same as above from Developer Console's Query Editor, and shown below. Any help on what I am doing wrong.
exceptionMessage='sObject type 'NewsFeed' is not supported.'