via the graph api, I create events for facebook pages I have the create_event and manage_pages privileges for.
I post to https://graph.facebook.com/pageId/events with the usual name, location, start_time, street, city parameters. Works perfectly.
However, I haven't found a way to submit a certain place_id for the event (e.g. FB-ID of the venue). This is possible using the web client. When creating an event, you can select a place/venue, the resulting event page shows that place on the map and links to the place page. Events created via the api only show the location name as text.
I tried place_page_id and several others as parameters, but nothing worked.
Has anybody done that successfully?
Thanks
Yes, you can. A poorly documented property of Event is location_id. Works fine.
The way I handle it is to search for type=place and if I find the place in the vast Facebook data store I use the id of that place in the location_id field. If I don't find the right place I use the information I have for street and city. (If you have location_id you really don't need street and city).
No with the current API it is not possible. Here's the only parameters for creating an event available. They are the same for user events as well as page events.
name (string)
start_time (timestamp)
end_time (timestamp)
description (string)
location (string)
privacy_type (string)
Related
I'm building an Angular 11 web app using AppSync for the backend.
I've mentioned group chat, but basically I have a feature in my app where I have an announcement feature where there's a person creating announcements to a specific audience (can be individual members or groups of members) and whenever the receiving user opens the announcement, it has to mark that announcement as read for that user in their UI and also let the sender know that it has been opened by that particular member.
I have an idea for implementing this:-
Each announcement needs to have a "seenBy" which aggregates the user Ids of the ones who open it.
Each member also has an attribute in their user object named "announcementsRead" which is an array of Ids of the announcements that they have opened.
In the UI when I'm gathering the list of announcements for the user, the ones whose ID don't belong in the member's own announcementsRead array, will be marked as unread.
When they click on it and it is opened, I make 2 updates - a) To the announcement object I simply push the member's user ID to the "seenBy" attribute and push to db. b) to the member's user object, I add the announcement's id to the "announcementRead" attribute and push it to the DB.
This is just something that I came up with.
Please let me know if there are any pitfalls to this approach. Or if there are simpler ways to achieve this functionality.
I have a few concerns as well:-
Let's say that two users are opening an announcement at the same time, and the clients try to update the announcement with the updated seenBy containing the user's ID, what happens when the two requests from two different clients are happening concurrently? It's possible that the first user fetches the object and then the second user fetches it immediately, and by the time the second user has updated the attribute and sent it back to the DB, the first user has already written their updated data. In such a case the second user's write to the DB will overwrite the first user's change. I am not sure of the internal mechanisms of the amplify data store, but I can imagine this happening. Is this possible? If so, how do we ensure that it is prevented?
Is it really necessary for me to maintain the "announcementsRead" attribute in the user? I mean I can imagine generating that list in the UI every time I get the list of announcements by checking if the current user's ID exists in the announcement's "seenBy" and maintaining that list in the UI, that way we can eliminate redundancy of info in the DB and also it would make sense to not accumulate extremely old announcement IDs that may have been deleted. But I'm wondering if having this on the member actually helps in an indispensable way.
Hope my questions are clear.
We have a company program designed to help us get control over data. It has feature to group all the application of one Client. If I want to take a look at them I click on the Client and I see a list of all applications made for him. Take a look at the picture below:
I was wondering if Microsoft Access can do the same? If yes where should I start looking?
I did some internet search and no solution found.
That is built in, and it is called Subdatasheet. You have relationships properly set between Clients and Order, for instance, when you open the Clients table you will see such small "+" allowing to view the Orders of the current client. You may have to set the Subdatasheet Name property of table Clients to "Orders" in this case.
If you want to work with forms, you can build a continuous from for Clients, then one for Orders, then insert the Orders subform in the Footer of the Clients form. Access might tell you you can't do this, just ignore, it works.
In Access that would simply be a continuous form with a filter. Typically opened from a list of clients, setting a filter for the applications of the selected client.
Unless I'm misunderstanding the question.
I'm a little bit lost for the moment trying to write my thesis.
I need to collect data from a facebook page, for later use them for network analysis.
I need to collect for each message posted:
ID of the message posted
Content
Type (picture, link, text or game)
ID and name of the person who has posted the message
Date of the creation of the message
If it is case, dates of the possible updates
Number of likes
Names and IDs of the likers
Number of shares
Names and IDs of the sharers
Number of comments
Name and ID of the commentator + content of the comment
Number of page likers at each moment (before each message posted)
Being not from the IT sector, i've got lots of difficulties. What's the easiest way to collect such data?
Moreover, do you think that it's legal to try to get data on public facebook pages?
Use Facebook Graph API. A few lines of simple Java program or perl script will suffice. You will need valid Auth Tokens.
I would like to find any of my own activity (post, comment, share, etc.) on another user's page or a fan page. That is, obtain a list of all the comments, posts and whatnot that I have made on user XYZ's page, or on SOMETVSHOW's page.
Is that possible at all? I've looked at the different relations that are accessible using the Graph API, but there seems to be no direct way to get this data.
One way to do this is to collect ALL of my own activity and then run this data through a filter that would extract just the comments, post, etc. that I left on a certain user's page or fan page. But that is not really efficient, especially if you have (like me) a very large amount of data to capture in the first place.
Also, I could go the other way and grab ALL of that user's or fan page's activity and the filter out my own posts and comments, but likewise, this would take an eternity and produce huge amounts of data that need to be processed.
Any ideas? Thank you!
You should be able to do this pretty easily via FQL:
SELECT post_id, type, message, created_time, attachment FROM stream
WHERE source_id = PAGE_ID AND actor_id = me() LIMIT 200
You will have the normal limitations of the stream table to deal with, so you may have to page back through these results to get everything you are looking for.
Is there a way to allow users to see workflow, but only allow them to see their own items within the workflow?
This seems like a problem that would be common. You have a large number of content creators and you only would want them to see how their content is moving in workflow, not the content created by others.
Possible (approximate and messy) solution:
The only possibility I could think of would be to turn off rights inheritance so that I could explicitly deny viewing rights to workflow. Then with a custom action in workflow I could explicitly turn on view rights to each item a user submits.
Am I on the right track? I hope not. ;)
Question Clarification:
I want approvers to see everything, but I want authors to open workflow and only see their own items, not dozens of items from other authors.
This is not the default behaviour as the common use of workflow is for an approval process. In that case the approval team would log in and see the items waiting for approval from the authoring team, if they could only see the items they created then they wouldn't see anything at all.
One way I can think of doing this would be to override the codebeside for the workbox application. Take a look at this file Website\sitecore\shell\Applications\Workbox\Workbox.xml and it's codebeside class Sitecore.Shell.Applications.Workbox.WorkboxForm. If you put your own class in here you could probably add all the logic you need to the 'GetItems' method.
Attacking this from another angle, given you want visibility to the authors on if their items have been approved or not, instead of giving them access to the workbox, why not add a customised email action to the approved status (or the approve command) so that the authors receive an email when their item has been approved. You could also customise the email so that it includes a link to the approved item or includes details of the item so that the author can identify the individual item if they have authored multiple items.
There is a sample email action in the Sitecore.Workflows.Simple.EmailAction class in the Sitecore.Kernel assembly that you can use as a base to your customisations.
If you want to make sure that all items are being approved within a certain timeframe, you could also use the ASR shared source module to generate reports on items that have not been approved within a certain timeframe and have it automatically email this report on a regular basis.