REST API POST and GET Error--Retriving following sites news feed

i have used below code to retrive the newsfeeds but im getting 403 error.i think url formation for POST and GET is wrong.Kindly anyone worked help mee. 
var feedManagerEndpoint;
// Get the SPAppWebUrl parameter from the query string and build
// the feed manager endpoint.
$(document).ready(function () {
var appweburl;
var params = document.URL.split("?")[1].split("&");
for (var i = 0; i < params.length; i = i + 1) {
var param = params[i].split("=");
if (param[0] === "SPAppWebUrl") appweburl = param[1];
alert(appweburl);
feedManagerEndpoint = decodeURIComponent(appweburl)+ "/_api/social.feed";
alert(feedManagerEndpoint);
postToMyFeed();
// Publish a post to the current user's feed by using the
// "<app web URL>/_api/social.feed/my/Feed/Post" endpoint.
function postToMyFeed() {
alert('pOST');
$.ajax( {
url: feedManagerEndpoint+"/my/Feed/Post",
type: "POST",
data: JSON.stringify( {
'restCreationData':{
'__metadata':{
'type':'SP.Social.SocialRestPostCreationData'
'ID':null,
'creationData':{
'__metadata':{
'type':'SP.Social.SocialPostCreationData'
'ContentText':'This post was published using REST.',
'UpdateStatusText':false
headers: {
"accept": "application/json;odata=verbose",
"content-type":"application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: getMyFeed,
error: function (xhr, ajaxOptions, thrownError) {
alert("POST error:\n" + xhr.status + "\n" + thrownError);
// Get the current user's feed by using the
// "<app web URL>/_api/social.feed/my/Feed" endpoint.
function getMyFeed() {
alert('get');
$.ajax( {
url: feedManagerEndpoint +"/my/Feed",
headers: {
"accept": "application/json;odata=verbose"
success: feedRetrieved,
error: function (xhr, ajaxOptions, thrownError) {
alert("GET error:\n" + xhr.status + "\n" + thrownError);
// Parse the JSON data and iterate through the feed.
function feedRetrieved(data) {
var stringData = JSON.stringify(data);
var jsonObject = JSON.parse(stringData);
alert(jsonObject);
var feed = jsonObject.d.SocialFeed.Threads;
alert(feed.results);
var threads = feed.results;
var feedContent = "";
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
var participants = thread.Actors;
var owner = participants.results[thread.OwnerIndex].Name;
feedContent += '<p>' + owner +
' said "' + thread.RootPost.Text + '"</p>';
$("#message").html(feedContent);

Hi Scott,
With EnableQueryRules and ProcessBestBets set to true in the search rest api, we can get the promoted results(best bets) in SharePoint 2013.
I recommend to type the search rest api URL in the browser directly and then check if the best bets are displayed at the top of the search results.
It will not displayed inside the table for normal results.
Please also make sure that the query text matches the query rule condition.
Thanks,
Victoria
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • HT1338 Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help neede

    Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help needed !

    Hello:
    I would trot back into the Apple store and have them fix the problem (or call Applecare with a warranty issue).  There is no sense in you wasting your time trying to troubleshoot things on a new computer.
    Barry

  • Trying to burn a cd and getting error message 4260  help?

    I am trying to burn a cd in ITunes and getting error message 4260   help please

    Could you post your diagnostics for us please?
    In iTunes, go "Help > Run Diagnostics". Uncheck the boxes other than DVD/CD tests, as per the following screenshot:
    ... and click "Next".
    When you get through to the final screen:
    ... click the "Copy to Clipboard" button and paste the diagnostics into a reply here.

  • Configured Mail in 10.4.11 to iCloud specifications and get error messages

    Configured Mail in 10.4.11 to iCloud specifications and get error messages and still cannot send and receive. Get error messages, "does not recognize password" etc. Have working on Snow Leopard, iPhone iPad but not 10.4.11 PPC Mail. Any help? I used Apple support set up. I originally had a .mac account and have tried both [email protected] and xxx.me.com as username. I Upgraded my password to stronger suggested strength. (one cap and one letter minimum 8) I verified Keychain. I have even deleted everything including Keychain and account and started over numerous times, still no joy.  Ports are incoming 993 and outgoing 587.  Will not be upgrading this machine due to production software issues but was told I could stll use the .mac email
    Any help here?
    -Thanks

    Give the date there is another probable solution. Were you originally a MobileMe subscriber? If you weren't, then please ignore the rest of this post.
    MobileMe subscribers who migrated to iCloud received complimentary extra storage up until September 30 2013. This has now expired. If you have less than 5GB data in iCloud then your storage simply reverts to 5GB.
    However if you have more than 5GB data, Backup, Documents and Mail will stop working until you either delete sufficient data to bring you within 5GB or purchase additional storage. Possibly this is what has happened to your - you should have been sent an email about this.
    For instructions on purchasing additional storage please see
    http://support.apple.com/kb/HT4874
    For help in reducing your iCloud data please see
    http://support.apple.com/kb/HT4847
    Your problem is that you cannot access iCloud to do this because you have no iCloud preference pane. Your only options are to use a compliant Mac (Lion or Mountain Lion) or an iOS5/6 device to purchase extra storage; or to go to http://icloud.com and delete as much as you can there (you may not be able to access this page on Tiger, but you would be able to do so from any more recent computer).

  • Prompted to upgrade iTunes on computer. Won't let me and get error message MSVVR80.dll not found. Attempted to reinstall, won't let me. Can you have iTunes and iCloud on the same computer?

    Prompted to upgrade iTunes on computer. Won't let me and get error message MSVVR80.dll not found. Attempted to reinstall, won't let me. Can you have iTunes and iCloud on the same computer?

    Try following the instructions of tt2 in https://discussions.apple.com/thread/5822086

  • FI:While posting MIRO getting Error of Balancing field Segment not filled

    Hello SAP Gurus,
    While  posting MIRO getting Error of Balancing field Segment in line item 001 not filled
    Message No.GLT2201.
    Please suggest me solution for it i read lots of related threats but could not solve this error.

    SPRO-Financial Accounting (New)-General Ledger Accounting (New)-Business Transactions-Document Splitting-Edit Constants for Nonassigned Processes-Select your constant-Double click and Select Assignment of profit center- Enter your dummy profit center here   otherwise
    SPRO-Financial Accounting (New)-General Ledger Accounting (New)-Business Transactions-Document Splitting-Edit Constants for Nonassigned Processes-Select your constant-Double click and Select Assignment of values-Enter here segment.

  • While Posting 122 getting error M7021 "Deficit of PU GR quantity 2 EA : 1100000000 1000 G102"

    Hi Experts,
    While Posting 122 getting error M7021 "Deficit of PU GR quantity 2 EA : 1100000000 1000 G102".
    Scenerio : Have received 4 peices of this material with Goods receipt using 105 document and want to return 2 pcs back to Vendor using 122 movement type and getting this error.
    Please let me know the problem as when checked with OMCQ it is showing Warning but inspite i am getting error.
    thanks

    Hi Abhishek,
    Please find enclosed the screen print for 122 mvt type and Document used is of 105 mvt type.
    Material Document 5000000097 is used for return delivery.
    Thanks

  • Hi, I have a HP f380 all in one printer. I have installed new black ink cartridge and get error.

    Hi, I have a HP f380 all in one printer. I have installed new black ink cartridge and get error stating please insert black ink cartridge.
    Please Help

    Make sure it is a genuine HP cartridge.  Take it out and clean the contact on the cartridge and in the printer.  Try again.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • Trying to register with ePrint and getting error code.Ajax submit failed: error = 403, Forbidden.

    Trying to register with ePrint and getting error code.Ajax submit failed: error = 403, Forbidden. I need help??

    To bypass this error attempt either a restart of your computer, or use an alernate broser such as firefox or chrome. If you already have another browser the latter may be the easier fix.
    Jon-W
    I work on behalf of HP
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    Click the KUDOS STAR on the left to say “Thanks” for helping!

  • After update apple tv 2 on itunes and get error 1602 i start my apple tv and see no contents or any programs there just i see settings and computers?

    after update my apple tv 2 and get error 1602 on itunes, i start it and found no content showing there only settings and computers?
    please any answer.
    my itunes is the latest.

    Welcome to the Apple Community.
    Unfortunately, a number of users appear to have encountered this problem. Some of these users have reported that the problem just disappears the following day or shortly after. Other users have found various other solutions to this problem.
    Firstly, are you receiving any date and time errors when you turn on your Apple TV?
    Check that you are properly connected to the Internet, by ensuring that you have a proper IP address and not one starting with 169. Also check that your location for the iTunes Store is set correctly, if so you might try changing it and then changing it back.
    If the problem persists try restarting the Apple TV by removing ALL the cables for 30 seconds, or resetting it using the reset option under general. You should also try restarting your router, or if this doesn't work you might like to try a restore.

  • Great Problemes after installing Yosemite (10.10.2 ) with Photoshop CS6....The program crashes --last time 10 times during my work session..wacomtable doesnt work..it is slow...and get error messages about the graphic card....It s a Terror to work with my

    great Problemes after installing Yosemite (10.10.2 ) with Photoshop CS6....The program crashes --last time 10 times during my work session..wacomtable doesnt work..it is slow...and get error messages about the graphic card....It s a Terror to work with my beloved Photoshop!

    The Yosemite upgrade very often damages existing Photoshop installations.  Thank Apple for that.
    You need to uninstall and re-install Photoshop, then apply all the Photoshop upgrades from scratch.
    But first, give us details about your setup:
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Trying to put quickbooks 2014 and getting error 36

    trying to put quickbooks 2014 and getting error 36

    To bypass this error attempt either a restart of your computer, or use an alernate broser such as firefox or chrome. If you already have another browser the latter may be the easier fix.
    Jon-W
    I work on behalf of HP
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    Click the KUDOS STAR on the left to say “Thanks” for helping!

  • My ipad will not come on.  i tried to restore and get error message 1603, dont know how to take out itsw

    my ipad will not come on.  i tried to restore and get error message 1603, dont know how to take out itsw which it tells me to do.

    Error 1603
    Follow the steps listed below for Error 1604. Also, discard the .ipsw file, open iTunes and attempt to download the update again. See the steps under Advanced Steps > Rename, move, or delete the iOS software file (.ipsw) below for file locations. If you do not want to remove the IPSW  in the original user, try restoring in a new administrator user. If the issue remains, Eliminate third-party security software conflicts.
    Error 1604
    This error is often related to USB timing. Try changing USB ports, using a different dock connector to USB cable, and other available USB troubleshooting steps (troubleshooting USB connections. If you are using a dock, bypass it and connect directly to the white Apple USB dock connector cable. If the issue persists on a known-good computer, the device may need service.
    If the issue is not resolved by USB isolation troubleshooting, and another computer is not available, try these steps to resolve the issue:
    Connect the device to iTunes, confirm that the device is in Recovery Mode. If it's not in Recovery Mode, put it into Recovery Mode.
    Restore and wait for the error.
    When prompted, click OK.
    Close and reopen iTunes while the device remains connected.
    The device should now be recognized in Recovery Mode again.
    Try to restore again.
    If the steps above do not resolve the issue, try restoring using a known-good USB cable, computer, and network connection.
    The above is from the 2nd link below.
    Update and restore alert messages on iPhone, iPad, and iPod touch
    http://www.buybuyla.com/tech/view/012953a0d412000e.shtml
    iOS: Resolving update and restore alert messages
    http://support.apple.com/kb/TS1275
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
     Cheers, Tom

  • Do I need to enable MySite or have a MySite created in order to follow content and get updates from Team Site library/Newsfeed?

    Hello, we are migrating to SharePoint 2013. In the current SharePoint 2007 implementation we have disabled MySite for several reasons. Question: Do we need to enable MySite or have a MySite created in order to follow content and get updates from Team
    Site library/Newsfeed?

    Hi,
    According to your description, my understanding is that you want to know if the MySite is needed for following content and getting updates of the followed content.
    When users follow documents, sites, or tags, status updates from documents, conversations on sites, and notifications of tag use show up in users’ newsfeed, so users need to their MySite to view the updates in Newsfeed by OOB and you need
    to migrate the MySite to SharePoint 2013.
    However, we can also use APIs to programmatically follow content, please refer to the link below:
    http://msdn.microsoft.com/en-us/library/office/jj163217(v=office.15).aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • I am trying to update PR and PS and get error code A12E3. cannot find solution.

    I am trying to update PR and PS and get error code A12E3. cannot find solution.

    " The feature you are trying to use is on a network resource that is unavailable. I tried to uninstall iTunes, and it would not uninstall. It gave me the following message " The path C:\documents and settings\network service\local settings\application data\apple\apple software update\iTunes.msi cannot be found.
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for