Greetings! I am in the process of creating a fairly simple Facebook app but I am getting very mixed and confusing documentation regarding APP integration points with FB Profile.
1) Is it possible to automatically post items from APP to NEWSFEED? (or is this deprecated?)
2) Is it possible to trigger NOTIFICATIONS in the gloabl notifaction drop down for the user? (or is this also deprecated?)
3) OR; are both Notifications + Newsfeed publishing available by using the Graph API now?
Thanks in advance!
Yes, using the post object
Yes...and NO. Depending on what you mean by notifications, this method would appear in the notifications drop down.
Welcome to Stackoverflow!
Related
I am working on a Chrome extension that generates a notification whenever an entered Facebook profile changes his/her profile picture. I want to know if it is possible to do so using the Facebook API. I know we can get the current profile picture of the person using the API but how can we generate the notification? Please guide. Thank you.
That´s what the Realtime API is for: https://developers.facebook.com/docs/graph-api/real-time-updates/
I assume it would be the picture subscription of the User object.
What #luschn said is correct, you can use the Realtime Updates API. Would I want to add is that you can't receive the Realtime Updates client-side, which means that you need to set up some backend infrastructure before you can use them. Your Chrome extension "frontend" then need to be notified on a change by your backend...
See
https://developers.facebook.com/docs/graph-api/real-time-updates/v2.3#setup
Im currently building a simple time based quiz game with Javascript. In this game im looking to enable the option of being able to challenge your facebook friends.
This has naturally had me look at the Facebook (API) tools available that would allow me to interact with the targeted friends to be challenged.
Im wondering if anyone could comment on my approach of the Facebook tools intended to be used and whether there's actually some better approach or even Facebook tools that I have missed and should consider in my setup.
My intention is to interact and engage with the friends I challenge / invite using the most relevant Facebook tools available.
1. FB Login - USER CREATE / LOGIN
The user connects through Facebook login - either creating a
user profile or automatically getting logged in upon visit, if the
fb_uid already exists in the DB. We get access token, email and all the basic stuff.
2. FB Request dialog - CHALLENGE YOUR FACEBOOK FRIENDS
The user clicks a "Challenge your friends" button and the Facebook Request dialog is initiated showing the inbuilt Facebook multi friend invite selector box. The user click some friends and submits.
= RESULT - A request to the friend is now viewable and visible in the App center
3. FB App Notifications - Engage more "visible" with your challenges friend
Upon submit from step nr 2, we would also initiate a App Notification call to the Graph API, that would eneable us to "post" a notification direct into the challenged notification tray.
There are some restrictions on which user you can post directly into the tray at, which would leave us to do some pre-checking on the basis of:
3.1 - First check if the challenged/invited user already has authorized the app
3.2 - If 3.1 is true, then initiate the App notifications Graph API call = notification posted to the tray.
One important note to this step - i've read that before you can initiate this call, then you need to fetch the Access token of the app itself and make the call to the Graph API with the app access token and not the user access token - not sure if anyone can confirm this.
3.3 - If 3.1 is false, then we're just left with the request to the app center.
QUESTIONS:
Q1. The intended interaction of challenging/inviting your friends in step nr 2 "worries" me a bit. Seeing the request ends up in the App center ONLY, the only way the user will see the notification is "accidently" seeing a number next to the App center left menu link. To me it seems unlikely few people will react to this??
Q2. The real engaging interaction seems to be in App Notifications - however you can only use this with users that ALREADY have accepted your app, leaving out a big chunk of people to interact more "visible" with.
I do know this restriction is probably due to spammy behaviour.
Are this really the most optimal approach of the Facebook toolset I can use in my little game?
The general idea of your approach seems fine. I've never had any experience with App Center, so i can't really comment on how effective and easy it would be implementing that approach, but there is an alternative.
Instead of inviting friends through App Center, you can simply leave a message on their wall using JS feed dialog, asking them to join you in the game (Leave a link or something that will handle the challenge part)
I am using the normal setup for sending invites through the requests dialogue:
FB.ui(
{
method: 'apprequests',
message: "Please add me, I am doing the same, thanks!"
},
function(response) {
console.log(response);
}
);
The response is successful, response.to shows multiple ids. So sending these invites works like it should. The problem is that these apprequests are not shown up as notifications like they usually do, instead the only place to find them here.
Has the API changed? Looking for answers has given me no results, though I did find this bug report from February 15th 2013.
Is Facebook just testing yet again, or has the API changed but not the documentation? I am truly grateful for any insights!
There's two simple things that might cause that problem.
One is that you application is missing the Canvas. Just add it from the your App panel in Facebook Developers.
The second one - make sure your app is NOT in SandBox Mode. If it is it won't send any notifications. I lost hours before figuring that out and changing the code in all possible ways.
Hope that helps.
Its not facebook bug its a problem in your facebook app configuration :
Follow the below configuration and its working like a charm.
You just need to go in to the Facebook developer and select your app and goes in to the setting of your app and click "Add Platform" and select "App On Facebook" and than add canvas url in it. now try to send invitation and it will show the notification.
Thanks
Sagar
or go to facebook developers,
Change 111 to your APP ID
-Fedmich
This was posted yesterday in facebook bugs site.
However, it is still not working for me even though I'm utilizing the exact code that the FB comment is referencing.
I realize this is not complete answer to the question and should be put in the comments. However I am a newbie and don't have enough reputation on StackOverflow to post comments. Emil, could you please let me know if you resolve this issue.
Had same issue, I added Secure Canvas URL, etc. But problem was I haven't provided iPhone Store ID inside iOS section in Settings.
As of Graph API 2.3, Game requests are only available to games.
As mentioned in Game Requests description, you have to create Facebook Web Games in App Portal, then you will get the notification with Game Request. Not for website anymore.
I had to implement facebook ‘apprequests’ instead of the deprecated ‘appinvites’ in an existing cordova app and spent hours debugging.
‘apprequests’ are only available in Facebook Apps categorized as ‘games’.
You can send notifications only to platforms (iOS, Android, Facebook web games) that are involved with the facebook app. That means, you will never receive a notification in your browser if you miss ‘facebook web games’ as platform. My expectation was to be notified in the facebook browser app if I was invited from a Mobile app.
iOS devices don’t get notifications.
In my case, I’ve missed to fill the app store id in the Facebook app platform configuration. After that, notifications appeared instantly.
If you like notifications in the fb browser app, you have to add ‘Facebook web games’ (formerly known as ‘canvas’) as plattform.
You can save yourself a lot trouble by creating test users in the app role category of your facebook app.
Are aware of any solution that let me deactivate my facebook account through an API. Facebook Graph , core libraries anything !!
I'm working on a mobile app and i want to give the user the ability to deactivate his account from the app IF HE ALREADY AUTHORIZED USING FACEBOOK .
i thought it might be impossible due to a big security issue but i just want to know if any solution existed
No, the only way for a user to deactivate their account is via Facebook's own UI or apps - there is no API for that functionality
I am trying to implement real-time(auto updating) wall feed in my app and I don't now how and the Facebook website requires you to do GET and POST commands. Is this possible, and if so how??
Thank So Much In Advance :)
To use Facebook Real-time updates you required to use publicly accessible URL as callback. So this isn't possible just using standalone application on iOS and you'll need to use some sort of web application/service to handle real-time subscriptions and then pass em to your application.