Post a event to application wall on facebook - php

the basic idea is, I created a application of which users will become fans and get the latest and greatest events from.
For that I will need to post a event to the wall page of the application itself.
Creating a event is not a problem (I'm using PHP5):
$event_id=$facebook->api_client->events_create(json_encode($FB));
But I couldn't find any reference on how to publish a wall entry for that.
This would only show up in the "event" tab
I tried using stream_publish - which works fine, but again I couldn't find a way to create a event.
Any hints would be appreciated.

create an event and then publish stream with a link to that event ? i dont think u can post events directly to wall

My hubby just figured it out -- because I was trying to gooogle the same answer! Create your event from your wall! (There is an event button right there with the link/picture buttons, where you update your status.)
From that event button you fill in the minor details - once it's created, you can go in and edit to add more details.

Here lies the answer create event

Related

Creating unique pages of a website by passing an sql key

The title may be a bit awful as I'm really not sure how to describe what I'm trying to achieve without using lots of words.
I'm currently building an events website. This website has the option for users to create their own events which can be added to a big list of upcoming events that other users have submitted.
What I want to do is be able to have a user create an event and have the details of the event stored in an SQL database (which I've successfully done), I want to be able to then have a large list of events on a separate page the details of which are pulled from the server dynamically using PHP and SQL (I've also successfully done this). The part I am struggling with however is being able to create unique pages (or a single dynamic page) that displays a more detailed look at the event, such as age restrictions etc etc, which cannot be displayed on the big list which displays all the available events.
I figured that this could be done using a unique eventID, which is something the SQL database already includes and autoincrements with each new event entry. What I'm really not sure about is how I'd be able to pass that eventID through the link to the more detailed page so that the detailed page can be created displaying all of the details of the event.
I'm not even sure if this idea will work at all. Would having a page with a unique URL that is created on event submission that has a more in-depth look at the details of the event be a better idea? How would I go about creating unique URL webpages that correspond to each event on event submission?
I'm really not sure how I need to go about this at all, so I need some help and pointing in the right direction.
Here's a kind of TLDR:
1) Events website
2) All events on the website are displayed on a single page that has minimal detail about each event (title, date, location) BUT has a link to a page that displays the event in more detail.
3) User can select an event from the list and click on that event's unique HTML link to more detailed page
4) More detailed page displays event in more detail by pulling event's unique information from the database
Feel free to ask any questions at all as I know this probably isn't the easiest idea to get across
When creating the links from the general listing page to the detail page, simply include the id in the link. For example:
<A HREF="mysite.com/detail.php?id=3>Big Event</A>
In detail.php then, you'll find the id in $_GET['id'].

Jquery post to reload or refresh Another window

Am developing a php mysql app with codeigniter for users on an intranet. It heavily uses jquery and flexigrid. One of the components on a page is a table which gets populated via jquery post based on user action/actions on other components of the same page ... So far, all works fine.
There are too many components (tables/forms, etc) on this page, and for lack of real estate, users have requested me to add functionality/ability to move one of the components to a new window. I can move the component in question to a new window, but am not sure how I could refresh that new window based on user activity on the default window - and thats where I could use some help.
An example of what I am looking for can be found in phpmyadmin, wherein you are able to edit a sql query in a popup window and on running the query, it updates another window with the results of the query - It also seems to know which window to update/refresh if there are multiple tabs/windows open ...
If you can give any hints on how to proceed with this, that'd would be very helpful ... thanks.
Look for window.opener in jquery you can use your querystring to pass data to the popup/form page

Provide an embed code of a section of a page for users to use

I have a ticketing site ( eventtickx.com...click buy tickets on the event ghana # 55(you will see the layout)). I want to generate embed code for event managers for each event they post. I want an embed code for the tickets available section only which has the information ( ticket assignment, quantity and price). so basically this is what I am trying to do ..generate an embed code for tickets available section of a page for each event to event manager that created the event. how do I go about doing this? Thanks for your help.
I'm not sure if I fully understand you, but I think you would like to provide a snippet like <iframe src="http://eventtickx.com/embed_event.php?eid=123"></iframe> to enable people to embed a little info box for a specific event on their site (like you can do with YouTube videos)?
What you would need is a script (e.g. embed_event.php) that provides the iframe content and takes one GET parameter.
This script would do the necesserary queries (getting event name, description, available tickets etc. from the database) and display them as a complete HTML page (similar to what you are doing in event_details.php).
The GET param would be typically the event ID that you could use to query your database.
The embed code could be generated as soon as you know the event ID (usually after you have inserted the dataset into you database when creating the event).

Google Map API - click on link gives more information

starting point is example showed on next link:
http://gmaps-samples-v3.googlecode.com/svn/trunk/sidebar/random-markers.html
i added new (second) div panel, and i would like that when end user clicks on one of items showed on left panel, it shows more information about it on new div panel.
so, how can i "read" on which item end user clicked? can i also send post request in background, so it can read data from database (using php)?
thank you in advance!
ok, i manage to solve it....
answer was simple:
$('#sideDetailInfo').html( infoWindow.leftLinkId );
tnx anw!

how can i get data from other browser without refreshing browser in cakephp?

i am new to cakephp, and also new to ajax.
the function i trying to do is basically like this:
i am in a add page, which let me select few customer on that page.
but i wanted to set 1 more link for user, which let user click customer immediately on the add page, and the new data will show in my add page without refresh, so that the user can choose the new added customer for enter my form.
i know the idea is base on using ajax. but i am still new to it and hope any 1 can give some comment or suggestion how can i start??
the problem i face is, i am on a form, when i adding a new customer in the form, i wanted to get the new customer to show in my form without refresh. what can i do for getting this function?
thanks a lot and i will very appreciate your answer.
CakePHP has an ajax helper, which requires the prototype library. You can find the API for the AJAX helper here:
http://api.cakephp.org/class/ajax-helper
And a guide to using the helper here:
http://book.cakephp.org/view/208/AJAX
And a list of cakephp/ajax articles here:
http://bakery.cakephp.org/articles/search/tags/ajax
It's beyond the scope of a Stack Overflow answer to give you a tutorial but hopefully these links will help.
easiest way is to use a javascript library (like jquery for instance) to do an ajax request.
probably to a controller/action in your cake framework.
the easiest way would probably be returning the data in JSON and filling out your form fields.
PHP Json
jQuery AjAX/JSON

Categories