Query regarding post comments using Facebook Javascript API - javascript

As per the Facebook Javascript API documentation, I need an APP Id to post comments on facebook wall. But when I log in to my Facebook account it always shows me “All Campaigns" page and I am not able to access “Apps” section to create new application and get APP Id which can be used in JavaScript API.
Can you please suggest how can I create an APP Id in my account and post comment on my facebook wall from external web pages using Facebook Javascript API.

You can view/create apps on Facebook for this purpose in the developers section. It sounds like you want to look at 'Build for Websites'. When you have made an app, it will appear in the apps section, where you can find your App ID and App Secret keys, as well as manage/edit the app.

I am not able to access “Apps” section to create new application
What exactly does „not being able” mean?
Is your account verified with Facebook (via text to mobile, credit card info)? That’s a basic requirement for becoming a developer on the FB platform.

Related

How to send a message from website to moodle?

I'm developing a website and I have to type a text in a box and send it as a message to moodle with some button. I have already made it with sending messages to linkedin, twitter and email but I don't know how to send to moodle and I'd be grateful if you help me.
Sounds like you need to use web services
Follow the instructions to set up Moodle as a web service
http://docs.moodle.org/26/en/Using_web_services
Then have a look through the list of functions available for web services - in your moodle site go to site admin -> plugins -> web services -> api documentation
or go direct to the url yourwebsite.com/admin/webservice/documentation.php
In the documentation there is a function to send instant messages to users :
core_message_send_instant_messages()
You can also set up social media so that they work within Moodle. Perhaps the easiest approach is to use a theme (in Moodle 2.6). I would recommend Essential. It has a form that lets you enter in social media. It is a responsive theme.
http://www.packtpub.com/designing-moodle-themes/video

Grabbing facebook feed in website

I develop mobile websites for my clients. This particular client would like some facebook wall activity to be displayed on the website. I have looked into the facebook graph api and am getting confused on authentication.
I need the blah in https://graphs.facebook.com/clientsfacebookid/feed?access_token=blah
in order to grab the info i want. I read about authentication and all of that but it doesn't seem to serve my purposes.. For example a lot of the stuff I read about getting a token is related to creating apps and stuff - which is not what I'm trying to do. A lot of ways to authenticate redirect users to log in or grant access to the information but this also doesn't seem like it fits my scenario.
Should I just talk to my client and get them to send me an access code or set up some stream so I can grab an updated access code anytime I need it OR is there some built in functionality in the API that I could benefit from using.
Any thoughts?
P.S. I am trying to implement this via an ajax call in javascript.
Thanks!
What you'll need to do is create a Facebook App and have your client add this to their page. You can then get an OAuth token for this app and use it to query the client's feed. See the Facebook documentation for authenticating as an app for details.
It's actually far simpler if you just want to grab the data from the page. Create an App, but you don't need to add it to the actual page. You can generate an App Access Token by following the instruction on the Facebook Developer Website.
Then, all you need to do is call the Graph API with the generated access_token. E.g.:
https://graph.facebook.com/{page_id}/feed?access_token={app_access_token}
You can then use the data returned by Facebook to display selected posts from the page.
The Page Admin doesn't need to add the app to the page, and this method can be used to scrape any published page. The posts on Pages is public anyway, you just need an access_token to access the page.
If you want a simple way to learn and have an example of a working model try out fourgefeed.com its a simple framework with a simple to implement example kinda like jquery.

Facebook Credits on an external website

I tryed the sample code found here:
https://developers.facebook.com/docs/creditsapi/
Even if i added my company address & payment, i still get this error:
API Error Code: 1151 API Error Description: Sorry, but this app may
not be eligible to accept Facebook Credits. If this app has accepted
credits before, please try again. Error Message: Invalid Application
I think the credits api best work on iframe apps. Is possible to integrate credits in my website?
Best
Matteo
credits only work in facebook canvas apps:
The Facebook Credits API enables a user to use credits as a method for
purchasing digital and virtual goods within a Facebook canvas
application. Please note: the credits api is not yet available for use
by external websites but only on canvas iframe applications.
The error is because you do not have a valid application id. You are going to have to create an application for your website. This can be done by going to https://developers.facebook.com/apps . If you have an application made for your website still go to the website and grab the App ID/API Key and put after
FB.init({appId:
What I do is redirect the user into the iFrame canvas for payment and then back out to my web site when done.
Not sure this breaks any Facebook agreement.

integrating facebook chat using graph api

I have been asked to integrate facebook chat in my application using javascript. I went through the chat api but that needs a domain url. I have to integrate the chat without the domain or the site url. I tried populating the online friends list through graph api, and I am able to successfully authenticate using the client flow example, but it does not redirect to my local host: http://localhost:8090/chatplugin/success.html. An error pops up telling me the resource is not found.
Is it possible to integrate FB chat using the graph api? I'm new to FB apis and I need more info.
Thanks:)
Short answer: no.
Longer answer: The Graph API lets you access all the information that is stored in Facebook's social graph; the social graph is the giant web that keeps all the information on people, events, messages, etc. Chat isn't part of the graph, it's a separate application, that also uses info from the graph to populate it.
While there may be other ways to sneak around (which I don't know), the Graph api doesn't provide what you need.
Please see the API available on Facebook API.
https://developers.facebook.com/docs/chat/

Is it possible to post to Facebook application Wall via JavaScript?

I have a Canvas Facebook app embedded via an iframe. I would like to include a feedback link which would encourage the user to leave a comment that would be added to the Application wall - this comment would open like a standard FB modal window. Is there anyway to post to to the Application Wall directly via JS? Everything I have found such as FB.Connect.StreamPublish(), only publishes to the users stream, I need to publish to the application stream. Thanks!
Apparently not, according to stream.publish - Facebook developers, section on target_id parameter:
Note: You cannot publish to an application profile page's Wall.

Categories